Skip to content

replace opaque error message with something easier for user#160

Open
StuartLittlefair wants to merge 1 commit intomasterfrom
nicer_errors
Open

replace opaque error message with something easier for user#160
StuartLittlefair wants to merge 1 commit intomasterfrom
nicer_errors

Conversation

@StuartLittlefair
Copy link
Contributor

Fixes #159 by adding a helper routine to crop calibration frames.

Note the nice error message needs to know the type of calibration frame being applied, which leads to this slightly verbose syntax. It would be good if there was a nice way of removing this duplication without adding code to the MCCD class, but I don't think there's a way to infer the calibration type automatically.

@martinjohndyer
Copy link
Member

I see what you mean about the syntax, something like calib_type = calib_frame.head["DTYPE"] would catch most cases if you're using bias/flat/dark etc files from the cameras, but I'm guessing that wouldn't work for fmaps etc since makefringe doesn't seem to set it, or any header cards like TARGET for that matter. Maybe the make* scripts probably should write something to the output header to mark it as a calibration file (other than just a comment), but that's a separate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Need more user friendly error messages in quick look scripts.

2 participants