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

DM-44605: Prompt processing can do ISR for LATISS calibrations #181

Merged
merged 3 commits into from
Aug 14, 2024

Conversation

hsinfang
Copy link
Collaborator

No description provided.

@hsinfang
Copy link
Collaborator Author

@kfindeisen do you mind taking a look of some additional commits for this ticket?

Copy link
Member

@kfindeisen kfindeisen left a comment

Choose a reason for hiding this comment

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

No objections to the existing changes, but I think prep_butler still assumes the visit contains sky coordinates...

Comment on lines 328 to 329
_log.warning("Got non-ICRS coordinates %s in Visit %s.",
repr(self.visit.coordinateSystem), self.visit)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
_log.warning("Got non-ICRS coordinates %s in Visit %s.",
repr(self.visit.coordinateSystem), self.visit)
_log.warning("Got non-ICRS coordinates %r in Visit %s.",
self.visit.coordinateSystem, self.visit)

Copy link
Member

Choose a reason for hiding this comment

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

Won't this still break when trying to preload spatial datasets (refcats and templates)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The nextVisit of those calibration frames have [ra,dec]=[0,0], so they don't "break" but just waste time copying non-useful data. But it's true that we may not rely on them always being [0,0] as the default; we might tell summit to do so assuming we can have our own special "prompt-processing-test" observing script.

Copy link
Member

Choose a reason for hiding this comment

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

I'm confused. What is the resolution of this issue?

Copy link
Collaborator Author

@hsinfang hsinfang Jul 17, 2024

Choose a reason for hiding this comment

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

(Sorry. I did not remember hitting "Resolve conversation" here and must have been a mistake) (Or did GitHub think it was resolved because I committed the suggested change?)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Coming back to this after a long time...

A bad value for dec indeed would break prep_butler, but any numeric values for ra and cameraAngle would be fine; any processed results after ISR would be suspicious of course. I changed it so it still raises if values are obviously bad, otherwise just logs a message and continue.

For the default case of [ra,dec]=[0,0], I think wasting time downloading potentially useless refcats is not a big deal.

What do you think?

Copy link
Member

Choose a reason for hiding this comment

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

I'd prefer to make loading of spatial datasets be conditional on having spatial coordinates in the first place, just because it's less error-prone than something that just happens to work. But I agree that run time is not a problem.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I hesitated on making these visits handled any differently and found the happenstance convenient, but you have a good point. It's indeed more robust to not use those coordinates at all. The last commit has been rewritten, and now the pointless loading will be skipped for non-on-sky visits.

Instead of constraining visit_system to 0 in the data query,
only define the one-to-one (visitSystem=0) visits in the repo.
This preserves the bahavior and makes it also work with
non-on-sky exposures that cannot take visit constraint in the
data query.
ts_idl package is being deprecated and the enumerations are
moved to ts_xml package.
@hsinfang hsinfang force-pushed the tickets/DM-44605 branch 7 times, most recently from 38058c0 to 06a13c7 Compare August 13, 2024 22:38
Copy link
Member

@kfindeisen kfindeisen left a comment

Choose a reason for hiding this comment

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

Thanks, no further objections.

self._skip_spatial_preload = True
_log.error("Only ICRS coordinates are fully supported. "
f"Got {self.visit.coordinateSystem!r} instead in {self.visit}. "
"Spatial datasets won't be loaded.")
Copy link
Member

Choose a reason for hiding this comment

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

Should this be a warning, given that we are plowing ahead anyway?

Copy link
Collaborator Author

@hsinfang hsinfang Aug 14, 2024

Choose a reason for hiding this comment

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

I slightly prefer this to be an error for now, so (1) it does not drown in so many warnings from the pipelines, and (2) in a way it is an error as the system isn't really designed to process those visits and something may go wrong later. I feel that this is similar to the level of finding no templates for some visits but we continue with the next best thing.

python/activator/middleware_interface.py Outdated Show resolved Hide resolved
Instead of raising an error, allow non-on-sky visits but
log an error and do not use those coordinates and camera
angles.
@hsinfang hsinfang changed the title DM-44605: Prompt processing can do ISR for LATISS calibrations of the survey BLOCK-295 DM-44605: Prompt processing can do ISR for LATISS calibrations Aug 14, 2024
@hsinfang hsinfang merged commit 8f60266 into main Aug 14, 2024
5 checks passed
@hsinfang hsinfang deleted the tickets/DM-44605 branch August 14, 2024 17:41
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.

2 participants