deepdisc.data_format.conversions
Attributes
Functions
|
Converts a list of single-band FITS images to multi-band numpy arrays |
|
Converts a list of single-band FITS images to flattened multi-band images in an hdf5 file |
|
Converts a list of dataset dictionaries to an hdf5 file (for RAIL usage) |
|
Converts a list of single-band FITS images to flattened multi-band images in an hdf5 file |
|
Converts dataset into COCO format and saves it to a json file. |
Module Contents
- fitsim_to_numpy(img_files, outdir, start_index=0)[source]
Converts a list of single-band FITS images to multi-band numpy arrays
- Parameters:
img_files (list[str]) – A nested list of the FITS image files. The first index is the image and the second index is the filter
outdir (str) – The directory to output the numpy arrays
start_index (int) – Index in the first img filename string used to chunk a unique identifier
end_index (int) – Index in the first img filename string used to chunk a unique identifier
- fitsim_to_hdf5(img_files, outname, dset='train')[source]
Converts a list of single-band FITS images to flattened multi-band images in an hdf5 file
- Parameters:
img_files (list[str]) – A nested list of the FITS image files. The first index is the image and the second index is the filter
outname (str) – The name of the output file
- ddict_to_hdf5(dataset_dicts, outname)[source]
Converts a list of dataset dictionaries to an hdf5 file (for RAIL usage)
- Parameters:
dataset_dicts (list[dict]) – The dataset dicts
outname (str) – The name of the output file
- numpyim_to_hdf5(img_files, outname)[source]
Converts a list of single-band FITS images to flattened multi-band images in an hdf5 file
- Parameters:
img_files (list[str]) – A nested list of the FITS image files. The first index is the image and the second index is the filter
outname (str) – The name of the output file
- convert_to_json(dict_list, output_file, allow_cached=True)[source]
Converts dataset into COCO format and saves it to a json file. dataset_name must be registered in DatasetCatalog and in detectron2’s standard format.
- Parameters:
dataset_name – reference from the config file to the catalogs must be registered in DatasetCatalog and in detectron2’s standard format
output_file – path of json file that will be saved to
allow_cached – if json file is already present then skip conversion