FitsManager#
- class prose.FitsManager#
Object to parse and retrieve FITS files from folder and sub-folders
This object scans files in a folder and stores the data in a mysql database for conveniance (but all products can be accessed without knowledge of the SQL language)
- Parameters:
folder (str) – path of the folder to parse (or list of folders as of prose 2.0.1)
depth (int, optional) – maxiumum depth of the sub-folders to explore, by default 0
hdu (int, optional) – by default 0
extension (str, optional) – by default “.f*ts*”
file (_type_, optional) – _description_, by default None
batch_size (bool or int, optional) –
if False: update database after all FITS files are parsed
if int: update database every time
batch_sizeFITS files are parsed
by default False
telescope (
Telescope`) – telescope to use while parsing files, by default None
Methods
__init__([folders, files, depth, hdu, ...])bias(i[, show])calibrations(**kwargs)return a pandas DataFrame of calibrations observations given some metadata constraints in the form of wildcards
darks(i[, show])files([id, path, exposure, tolerance])Return a pandas DataFrame of files given some metadata constraints in the form of wildcards
flats(i[, show])get_files(folders, extension[, scan, depth])Return path of files with specific extension in the specified folder(s)
images(i[, show])label(i)observation_files(i[, past, future, ...])observations([hide_exposure])return a pandas DataFrame of observations given some metadata constraints in the form of wildcards
paths(**kwargs)Get the paths of all files matching the kwargs query (see prose.FitsImage.files)
scan_files(files[, batch_size, verbose, ...])Scan files and add data to database
to_pandas(query)Attributes
all_biasfits paths of the observation bias images
all_darksfits paths of the observation dark images
all_flatsfits paths of the observation flats images
all_imagesfits paths of the observation science images
obs_nameObservation name ({telescope}_{date}_{target}_{filter}) if a single observation is present
reducedfits paths of the observation calibrated images if present
stackfits paths of the observation stack image if present
unique_obsReturn whether the object contains a unique observation (observation is defined as a unique combinaison of date, telescope, target and filter).