Skip to content

Commit

Permalink
Added the ability to reduce experimental frames.
Browse files Browse the repository at this point in the history
  • Loading branch information
Curtis McCully committed Aug 26, 2016
1 parent f151f90 commit 1381daa
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
18 changes: 16 additions & 2 deletions banzai/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,27 @@ def reduce_science_frames(pipeline_context):
reduce_frames_one_by_one(stages_to_do, pipeline_context)


def reduce_frames_one_by_one(stages_to_do, pipeline_context):
def reduce_experimental_frames(pipeline_context):
stages_to_do = [munge.DataMunger, qc.SaturationTest, crosstalk.CrosstalkCorrector,
bias.OverscanSubtractor, gain.GainNormalizer, mosaic.MosaicCreator,
bpm.BPMUpdater, trim.Trimmer, bias.BiasSubtractor, dark.DarkSubtractor,
flats.FlatDivider, photometry.SourceDetector, astrometry.WCSSolver,
headers.HeaderUpdater, pointing.PointingTest]

reduce_frames_one_by_one(stages_to_do, pipeline_context, image_types=['EXPERIMENTAL'])


def reduce_experimental_frames_console():
run_end_of_night_from_console([reduce_experimental_frames])


def reduce_frames_one_by_one(stages_to_do, pipeline_context, image_types=['EXPOSE', 'STANDARD']):
image_list = image_utils.make_image_list(pipeline_context)
original_filename = pipeline_context.filename
for image in image_list:
pipeline_context.filename = os.path.basename(image)
try:
run(stages_to_do, pipeline_context, image_types=['EXPOSE', 'STANDARD'])
run(stages_to_do, pipeline_context, image_types=image_types)
except Exception as e:
logger.error('{0}'.format(e), extra={'tags': {'filename': pipeline_context.filename,
'filepath': pipeline_context.raw_path}})
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,4 @@ banzai_reduce_science_frames = banzai.main:reduce_science_frames_console
banzai_reduce_night = banzai.main:reduce_night
banzai_run_preview_pipeline = banzai.main:run_preview_pipeline
banzai_preprocess_sinistro = banzai.main:preprocess_sinistro_frames_console
banzai_reduce_experimental_frames = banzai.main:reduce_experimental_frames_console

0 comments on commit 1381daa

Please sign in to comment.