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_size FITS files are parsed

    by default False

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

scan_files(files[, batch_size, verbose, ...])

Scan files and add data to database

to_pandas(query)

Attributes

all_bias

fits paths of the observation bias images

all_darks

fits paths of the observation dark images

all_flats

fits paths of the observation flats images

all_images

fits paths of the observation science images

obs_name

Observation name ({telescope}_{date}_{target}_{filter}) if a single observation is present

reduced

fits paths of the observation calibrated images if present

stack

fits paths of the observation stack image if present

unique_obs

Return whether the object contains a unique observation (observation is defined as a unique combinaison of date, telescope, target and filter).