Skip to content

Commit

Permalink
Update to skyflat config
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdstein committed Dec 2, 2024
1 parent 641fcd9 commit c54e57d
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 7 deletions.
35 changes: 32 additions & 3 deletions mirar/pipelines/winter/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
base_output_dir,
)
from mirar.pipelines.winter.config import (
base_winter_cal_requirements,
prv_candidate_cols,
psfex_path,
scamp_config_path,
Expand Down Expand Up @@ -223,13 +224,21 @@
# Loading

load_raw = [
MEFLoader(
input_sub_dir="raw",
load_image=load_winter_mef_image,
),
CalHunter(load_image=load_winter_mef_image, requirements=winter_cal_requirements),
]

load_raw_no_dome_flats = [
MEFLoader(
input_sub_dir="raw",
load_image=load_winter_mef_image,
),
CalHunter(
load_image=load_winter_mef_image, requirements=winter_cal_requirements
), # FIXME: add back in
load_image=load_winter_mef_image, requirements=base_winter_cal_requirements
),
]

load_astrometry = [
Expand Down Expand Up @@ -370,7 +379,7 @@
CustomImageBatchModifier(winter_dark_oversubtraction_rejector),
]

flat_calibrate = [
dome_flats = [
ImageRebatcher(["SUBCOORD", "FILTER"]),
FlatCalibrator(
cache_sub_dir="calibration_flats",
Expand All @@ -380,6 +389,9 @@
),
ImageSelector((OBSCLASS_KEY, ["science"])),
ImageSaver(output_dir_name="domeflatcal"),
]

sky_flats = [
ImageRebatcher(
[
"BOARD_ID",
Expand Down Expand Up @@ -409,6 +421,8 @@
ImageSaver(output_dir_name="skysub"),
]

flat_calibrate = dome_flats + sky_flats

load_calibrated = [
ImageLoader(input_sub_dir="skysub", input_img_dir=base_output_dir),
ImageBatcher(["UTCTIME", "BOARD_ID"]),
Expand Down Expand Up @@ -923,6 +937,10 @@

unpack_all = load_raw + extract_all + csvlog + mask_and_split + save_raw

unpack_all_no_dome_flats = (
load_raw_no_dome_flats + extract_all + csvlog + mask_and_split + save_raw
)

full_reduction = (
non_linear_correction
+ dark_calibrate
Expand All @@ -932,6 +950,15 @@
+ photcal_and_export
)

full_reduction_no_dome_flats = (
non_linear_correction
+ dark_calibrate
+ sky_flats # Only sky flats
+ fourier_filter
+ process_and_stack
+ photcal_and_export
)

photcal_stacks = [
ImageLoader(
input_sub_dir="stack",
Expand All @@ -948,6 +975,8 @@

reduce = unpack_all + full_reduction

reduce_no_dome_flats = unpack_all_no_dome_flats + full_reduction_no_dome_flats

reftest = (
unpack_subset
+ dark_calibrate
Expand Down
17 changes: 13 additions & 4 deletions mirar/pipelines/winter/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,25 @@
psfex_path = winter_file_dir.joinpath("photom.psfex")
ref_psfex_path = winter_file_dir.joinpath("reference.psfex")

winter_cal_requirements = [
base_winter_cal_requirements = [
CalRequirement(
target_name="dark",
required_field="EXPTIME",
required_values=[
"120.0", # J/Y
"60.0", # Hs
"3.0", # J flats
"4.0", # Y flats
"5.0", # Hs flats
],
),
]

winter_cal_requirements = base_winter_cal_requirements + [
CalRequirement(
target_name="dark",
required_field="EXPTIME",
required_values=[
"0.35", # J flats
"0.57", # Y flats
"0.46", # Hs flats
],
),
CalRequirement(
Expand Down
6 changes: 6 additions & 0 deletions mirar/pipelines/winter/winter_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
process_candidates,
realtime,
reduce,
reduce_no_dome_flats,
reduce_unpacked,
reduce_unpacked_subset,
refbuild,
Expand Down Expand Up @@ -103,6 +104,11 @@ class WINTERPipeline(Pipeline):
+ detect_candidates
+ process_candidates
+ avro_broadcast,
"skyflat": reduce_no_dome_flats
+ imsub
+ detect_candidates
+ process_candidates
+ avro_broadcast,
"remask": remask,
"default_subset": reduce_unpacked_subset
+ imsub
Expand Down

0 comments on commit c54e57d

Please sign in to comment.