autowisp.file_utilities module

Class Inheritance Diagram

Inheritance diagram of Evaluator, partial

A collection of functions for finding files to process.

autowisp.file_utilities.find_data_fnames(image_collection, include_condition='True', *, recursive=False, search_wildcards=('*.fits', '*.fits.fz'))[source]

Select FITS images matching a header condition.

Parameters:
  • data_collection (list) – A list of directories or individual images to search for suitable files. For directories, images with ‘.fits’ or ‘fits.fz’ extensions are selected.

  • include_condition (str) – Expression involving the header of the images that evaluates to True/False if a particular image from the specified image collection should/should not be processed.

  • recursive (bool) – Should directories be searched recursively for images or just their top level.

  • search_wildcards (str iter) – Filename wildcards to search for.

Yields:

The images specified in the image_colleciton argument that satisfy the given condition.

autowisp.file_utilities.find_dr_fnames(image_collection, include_condition='True', *, recursive=False, search_wildcards=('*.h5', '*.hdf5'))

Select FITS images matching a header condition.

Parameters:
  • data_collection (list) – A list of directories or individual images to search for suitable files. For directories, images with ‘.fits’ or ‘fits.fz’ extensions are selected.

  • include_condition (str) – Expression involving the header of the images that evaluates to True/False if a particular image from the specified image collection should/should not be processed.

  • recursive (bool) – Should directories be searched recursively for images or just their top level.

  • search_wildcards (str iter) – Filename wildcards to search for.

Yields:

The images specified in the image_colleciton argument that satisfy the given condition.

autowisp.file_utilities.find_fits_fnames(image_collection, include_condition='True', *, recursive=False, search_wildcards=('*.fits', '*.fits.fz'))

Select FITS images matching a header condition.

Parameters:
  • data_collection (list) – A list of directories or individual images to search for suitable files. For directories, images with ‘.fits’ or ‘fits.fz’ extensions are selected.

  • include_condition (str) – Expression involving the header of the images that evaluates to True/False if a particular image from the specified image collection should/should not be processed.

  • recursive (bool) – Should directories be searched recursively for images or just their top level.

  • search_wildcards (str iter) – Filename wildcards to search for.

Yields:

The images specified in the image_colleciton argument that satisfy the given condition.

autowisp.file_utilities.find_fits_with_dr_fnames(image_collection, include_condition='True', *, dr_fname_format, **kwargs)[source]

Same as find_data_fnames() but eliminates those without DR files.

autowisp.file_utilities.find_lc_fnames(image_collection, include_condition='True', *, recursive=False, search_wildcards=('*.h5', '*.hdf5'))

Select FITS images matching a header condition.

Parameters:
  • data_collection (list) – A list of directories or individual images to search for suitable files. For directories, images with ‘.fits’ or ‘fits.fz’ extensions are selected.

  • include_condition (str) – Expression involving the header of the images that evaluates to True/False if a particular image from the specified image collection should/should not be processed.

  • recursive (bool) – Should directories be searched recursively for images or just their top level.

  • search_wildcards (str iter) – Filename wildcards to search for.

Yields:

The images specified in the image_colleciton argument that satisfy the given condition.

autowisp.file_utilities.get_data_filenames(data_collection, include_condition='True', recursive=True)[source]

Select FITS images or DR files that match a specified header condition.

Parameters:
  • data_collection ([str]) – A set of patterns passed directly to glob to search for suitable files.

  • recursive (bool) – Should inputs globs be searched recursively?

  • include_condition (str) – See find_data_fnames()

Yields:

The files from the input collection that satisfy the given condition.