Skip to content

Commit

Permalink
interim
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdstein committed May 14, 2024
1 parent c85d6d9 commit 1257b91
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
3 changes: 1 addition & 2 deletions mirar/pipelines/winter/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,6 @@
"T_ROIC",
"FIELDID",
"MEDCOUNT",
"DITHGRP",
]
),
]
Expand Down Expand Up @@ -380,7 +379,7 @@
cache_sub_dir="sky_dither_flats",
select_flat_images=select_winter_sky_flat_images,
flat_mode="structure",
# flat_mode="median",
# flat_mode="median",
),
ImageSaver(output_dir_name="allskyflatcal"),
ImageRebatcher([BASE_NAME_KEY]),
Expand Down
3 changes: 3 additions & 0 deletions mirar/pipelines/winter/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@
CalRequirement(
target_name="dark", required_field="EXPTIME", required_values=["120.0"]
),
CalRequirement(
target_name="domeflat", required_field="FILTER", required_values=["Y", "J", "Hs"]
),
]

winter_avro_schema_path = winter_file_dir.joinpath("avro_schema/winter.alert.avsc")
Expand Down
7 changes: 7 additions & 0 deletions mirar/pipelines/winter/load_winter_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,13 @@ def clean_header(header: fits.Header) -> fits.Header:
header[OBSCLASS_KEY] = "flat"
header[TARGET_KEY] = "flat"

# Throw out flats with low counts

if header[OBSCLASS_KEY].lower() == "flat":
if header["MEDCOUNT"] < 20000.0:
header[OBSCLASS_KEY] = "test"
header[TARGET_KEY] = "test"

header["EXPTIME"] = np.rint(header["EXPTIME"])

# Set up the target name
Expand Down

0 comments on commit 1257b91

Please sign in to comment.