Pipeline

Create STIS Superdarks and Superbiases for the CCD detector.

refstis.pipeline.clean_directory(root_path)[source]

Cleans directory of any fits files that do not end in _raw.fits

Warning

This WILL remove ANY files that do not match *_raw.fits. This includes any plots, txt files, other fits files, anything.

refstis.pipeline.collect_new(observations_to_get, settings)[source]

Function to find and retrieve new datasets for given proposal.

refstis.pipeline.grab_between(file_list, mjd_start, mjd_end)[source]

Select files between given start/end times

Parameters:
  • file_list (list) – files on which to filter
  • mjd_start (float) – earliest time
  • mjd_end (float) – latest time
Yields:

filenames with mjd_start < TEXPSTRT < mjd_end

refstis.pipeline.make_pipeline_reffiles(root_folder, last_basedark=None, last_basebias=None)[source]

Make reference files like the refstis pipeline

1. Separate dark and bias datasets into week folders 2.

refstis.pipeline.pull_info(foldername)[source]

Pull proposal and week number from folder name

A valid proposal is a string of 5 numbers from 0-9 A valid week is a string of ‘wk’ + 2 numbers ranging from 0-9. A valid biweek is the string ‘biwk’ + 2 numbers from 0-9.

Parameters:foldername – string, name of folder to search in
Returns:
  • proposal – string, proposal number as string
  • week – string, week of the anneal (wk01, etc)
refstis.pipeline.pull_out_subfolders(root_folder)[source]

Walk through input folder and use regular expressions to return lists of the folders for each gain and for each week

Parameters:root_folder – string, the folder to walk through
Returns:
  • gain_folders – list, containing folders for each gain
  • week_folders – list, containing folders for each week
refstis.pipeline.run(config_file='config.yaml')[source]

Run the reference file pipeline

refstis.pipeline.separate_period(base_dir)[source]

Separate observations in the base dir into needed folders.

Parameters:str (base_dir,) – directory containing darks and biases to be split.
refstis.pipeline.split_files(all_files)[source]

Split file list into two smaller lists for iraf tasks

Each list will have a selection from both early and late in time.

Parameters:all_files (list) – full list of files
Returns:super_list – list of lists containing the split list of all files
Return type:list