Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefer same block/proposal for calibrations. Only use public calibrations. Use calibrations with the same slit width (i.e. same slit mask) for processing. #34

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
0.12.0 (2024-12-11)
-------------------
- We now prefer using calibrations, specifically arcs, from the same block or the same proposal
- We only use public calibrations now
jchate6 marked this conversation as resolved.
Show resolved Hide resolved
- If a block is still going, we delay the processing in case there is a calibration taken at
at the end of the block that we can use for processing
- We now only use arcs and flats taken with the same slit width as the science data

0.11.2 (2024-11-18)
-------------------
- Simplified the fitting for refining the peak centers. We no longer try to fit them all simultaneously
Expand Down
4 changes: 4 additions & 0 deletions banzai_floyds/frames.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,10 @@ def elevation(self):
def elevation(self, value):
self.meta['HEIGHT'] = value

@property
def slit_width(self):
return self.meta['APERWID']


class FLOYDSCalibrationFrame(LCOCalibrationFrame, FLOYDSObservationFrame):
def __init__(self, hdu_list: list, file_path: str, frame_id: int = None, grouping_criteria: list = None,
Expand Down
1 change: 1 addition & 0 deletions banzai_floyds/fringe.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ def do_stage(self, image):
image.uncertainty[to_correct] /= fringe_correction[fringe_correction > 0.1]
image.meta['L1FRNGOF'] = (fringe_offset, 'Fringe offset (pixels)')
image.meta['L1STATFR'] = (1, 'Status flag for fringe frame correction')
image.public_date = datetime.now()
return image


Expand Down
5 changes: 5 additions & 0 deletions banzai_floyds/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,8 @@
CALIBRATION_IMAGE_TYPES = ['BIAS', 'DARK', 'SKYFLAT', 'BPM', 'LAMPFLAT', 'ARC', 'STANDARD']

CALIBRATION_LOOKBACK = {'LAMPFLAT': 2.5}

CALIBRATION_SET_CRITERIA = {'SKYFLAT': [], 'LAMPFLAT': ['slit_width'], 'ARC': ['slit_width'],
'FRINGE': ['slit_width']}

OBSTYPES_TO_DELAY = ['STANDARD', 'SPECTRUM']
4 changes: 4 additions & 0 deletions helm-chart/banzai-floyds/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,9 @@ spec:
- "--rlevel=91"
- "--db-address=$(DB_ADDRESS)"
- "--no-file-cache"
- "--delay-to-block-end"
- "--same-block-cals"
- "--check-public-cals"
- "--prefer-same-proposal"
restartPolicy: Never
{{- end }}
4 changes: 4 additions & 0 deletions helm-chart/banzai-floyds/templates/listener.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ spec:
- "--broker-url=$(FITS_BROKER)"
- "--queue-name=$(QUEUE_NAME)"
- "--no-file-cache"
- "--delay-to-block-end"
- "--same-block-cals"
- "--check-public-cals"
- "--prefer-same-proposal"
env:
{{- include "banzaiFloyds.Env" . | nindent 12}}
resources:
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ setup_requires =
psycopg2-binary
install_requires =
astropy >= 4.3
banzai @ git+https://github.com/lcogt/banzai.git@1.19.1
banzai @ git+https://github.com/lcogt/banzai.git@cals-by-block.git
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remember to replace with tag

matplotlib

[options.extras_require]
Expand Down
Loading