class craftutils.observation.epoch.GSAOIImagingEpoch(craftutils.observation.epoch.ImagingEpoch)

This class works a little differently to the other epochs; instead of keeping track of the files internally, we let DRAGONS do that for us. Thus, many of the dictionaries and lists of files used in other Epoch classes will be empty even if the files are actually being tracked correctly. See eg science_table instead.

Public members

instrument_name = 'gs-aoi'
GSAOIImagingEpoch(name: str = None, ...)

Initialize self. See help(type(self)) for accurate signature.

classmethod stages()
proc_download(output_dir: str, **kwargs)
retrieve(output_dir: str, overwrite: bool = False)
proc_reduce_flats(output_dir: str, **kwargs)
proc_reduce_science(output_dir: str, **kwargs)
proc_stack_science(output_dir: str, **kwargs)
check_filter(fil: str)

If a filter name is not present in the various lists and dictionaries that use it, adds it. :param fil: :return: False if None, True if not.

load_output_file(**kwargs)

Loads the output .yaml file, which contains various values derived from this Epoch, using the object’s output_file attribute (which is a path to the file).

classmethod default_params()
classmethod from_file(param_file: str | dict, name: str = None, ...)
classmethod sort_files(input_dir: str, ...)

A routine to sort through a directory containing an arbitrary number of GSAOI observations and assign epochs to them.

stage_params : dict
exclude_frames : list
mode = 'imaging'
frames_for_combined = 'astrometry'
skip_for_combined = ['download', 'initial_setup', 'sort_reduced', 'trim_reduced', 'convert_to_cs', 'correct_astrometry_frames']
validation_stages = ['insert_synthetic_frames']
n_frames(fil: str)
proc_insert_synthetic_frames(output_dir: str, **kwargs)
generate_validation_catalogue(force=False, ...)
insert_synthetic_frames(frame_type: str, output_dir: str, **kwargs)
proc_defringe(output_dir: str, **kwargs)
generate_master_biases(output_dir: str | None = None, ...)

This does nothing, but will eventually do what the function name says.

generate_master_flats(output_dir: str | None = None, ...)

This does nothing, but will eventually do what the function name says.

generate_fringe_map(fil: str, output_dir: str | None = None, ...)
Returns

proc_subtract_background_frames(output_dir: str, **kwargs)
subtract_background_frames(output_dir: str, ...)
proc_register(output_dir: str, **kwargs)
register(output_dir: str, frames: dict | None = None, ...)
Parameters
output_dir: str

frames: dict | None = None

template

There are three options for this parameter: int: An integer specifying the position of the image in the list to use as the template for alignment (ie, each filter will use the same list position) dict: a dictionary with keys reflecting the filter names, with values specifying the list position as above ImagingImage: an image from outside this epoch to use as template. You can also pass the path to the image

as a string.

kwargs

Returns

proc_correct_astrometry_frames(output_dir: str, **kwargs)
correct_astrometry_frames(output_dir: str, ...)
proc_frame_diagnostics(output_dir: str, **kwargs)
frame_psf_diagnostics(output_dir: str, frame_dict: dict, ...)
proc_coadd(output_dir: str, **kwargs)
coadd(output_dir: str, frames: str = 'astrometry', ...)

Use Montage and ccdproc to coadd individual frames.

proc_correct_astrometry_coadded(output_dir: str, **kwargs)
correct_astrometry_coadded(output_dir: str, ...)
proc_trim_coadded(output_dir: str, **kwargs)
trim_coadded(output_dir: str, images: dict | None = None, ...)
proc_source_extraction(output_dir: str, **kwargs)
source_extraction(output_dir: str, ...)
proc_photometric_calibration(output_dir: str, **kwargs)
photometric_calibration(output_path: str, image_dict: dict, **)
zeropoint(image_dict: dict, output_path: str, ...)
proc_dual_mode_source_extraction(output_dir: str, **kwargs)
dual_mode_source_extraction(path: str, ...)
proc_finalise(output_dir: str, **kwargs)
finalise(image_type: str = 'final', ...)

Performs a number of wrap-up actions: - Ensures final fits files have correct header information - Renames and copies final files to appropriate paths - Updates epoch tables

proc_get_photometry(output_dir: str, **kwargs)
did_local_background_subtraction()
best_for_path(image_type: str = 'final', exclude: list = ())
probabilistic_association(image_type: str = 'final', **path_kwargs)
get_photometry(path: str, image_type: str = 'finalised', ...)

Retrieve photometric properties of key objects and write to disk.

validation_checks(...)
astrometry_diagnostics(images: ~typing.Optional[dict] = None, ...)
psf_diagnostics(images: dict | None = None)
guess_data_path()
generate_astrometry_indices(cat_name='gaia', ...)

Generates astrometry indices using astrometry.net and the specified catalogue, unless they have been generated before; in which case it simply copies them to the main index directory (overwriting those of other epochs there).

epoch_gaia_catalogue(correct_to_epoch: bool = True)
add_frame_raw(raw_frame: ImagingImage | str)
add_frame_reduced(frame: str | ImagingImage)
add_frame_trimmed(frame: ImagingImage)
add_frame_subtracted(frame: str | ImagingImage)
add_frame_registered(frame: str | ImagingImage)
add_frame_astrometry(frame: str | ImagingImage)
add_frame_diagnosed(frame: str | ImagingImage)
add_frame_normalised(frame: str | ImagingImage)
add_coadded_trimmed_image(img: str | Image, key: str, **kwargs)
add_coadded_unprojected_image(img: str | Image, key: str, **kwargs)
add_coadded_subtracted_image(img: str | Image, key: str, **kwargs)
add_coadded_subtracted_trimmed_image(img: str | Image, key: str, **)
add_coadded_subtracted_patch_image(img: str | Image, key: str, **)
add_coadded_astrometry_image(img: str | Image, key: str, **kwargs)
plot_object(img: str, fil: str, fig: ~matplotlib.figure.Figure, ...)
push_to_table()
classmethod from_params(name: str, instrument: str, ...)
classmethod build_param_path(instrument_name: str, field_name, ...)
classmethod build_data_path_absolute(field: Field, ...)
classmethod select_child_class(instrument: str)
is_excluded(frame: Image | str)
__str__()

Return str(self).

__repr__()

Return repr(self).

date_str(include_time: bool = False)
mjd()
proc_initial_setup(output_dir: str, **kwargs)
set_program_id(program_id: str)
set_date(date: str | Time)
set_target(target: str)
get_binning()
set_binning(binning: str)
get_binning_std()
set_binning_std(binning: str)
get_path(key: str)
get_master_bias(chip: int)
get_master_flat(chip: int, fil: str)
classmethod sort_by_chip(images: list)
add_coadded_image(img: str | Image, key: str, **kwargs)
sort_frame(frame: Image, sort_key: str | None = None)
classmethod new_yaml(name: str, path: str | None = None, **kwargs)
stage_output_dirs = True
add_log(action: str, method=None, method_args=None, ...)
set_path(key: str, value: str)
classmethod enumerate_stages(show: bool = True)
query_stage(message: str, stage_name: str, n: float, ...)

Helper method for asking the user if we need to do this stage of processing. If self.do is True, skips the query and returns True.

check_done(stage: str)
pipeline(no_query: bool = False, **kwargs)

Performs the pipeline methods given in stages() for this instance.

update_output_file()
update_param_file(param: str)

Epoch classes

frame_class(craftutils.observation.epoch.ImagingEpoch.coadded_class)

alias of GSAOIImage

coadded_class(craftutils.observation.epoch.ImagingEpoch.coadded_class)

alias of GSAOIImage