merging#
Methods for merging partial result files (FITS / HDF).
- hsr4hci.merging.get_list_of_fits_file_paths(fits_dir, prefix)[source]#
Get a list of all FITS files in a given
fits_dirwhose file name begins with the givenprefix.
- hsr4hci.merging.get_list_of_hdf_file_paths(hdf_dir, prefix='residuals')[source]#
Get a list of all HDF files in a given
hdf_dirwhose file name begins with the givenprefix.
- hsr4hci.merging.merge_fits_files(fits_file_paths)[source]#
Take a list of FITS files and merge all of them into a single array.
This function can merge the partial result files that are obtained in parallel with
hsr4hci.hypotheses.get_all_hypotheses()andhsr4hci.match_fraction.get_all_match_fractions().Merging works by stacking the arrays from the FITS files along a new axis and then taking the
numpy.nanmean()along this axis. This, of course, assumes that each pixel only takes on a non- NaN value in at most one of the FITS files.
- hsr4hci.merging.merge_hdf_files(hdf_file_paths)[source]#
Take a list of HDF files and merge all of them into a single dict.
This function is intended to merge the (partial) results files that are produced by
hsr4hci.training.train_all_models(); see there for more details on the expected internal structure of the files.