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-43297: Add visitInfo to exposures #96
Conversation
viDict = {} | ||
viDict["exposureTime"] = header.get("EXPTIME") | ||
|
||
# set the midpoint of BEG and END as the DATE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? Is this "our" convention??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might well not be in DM, but this is what we want for StarTracker images when building the pointing model.
begin = datetime.datetime.fromisoformat(header.get("DATE-BEG")) | ||
end = datetime.datetime.fromisoformat(header.get("DATE-END")) | ||
duration = end - begin | ||
mid = begin + duration / 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could just do mid = begin + (end - begin) / 2
if you care about file length.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yeah, I was going to cross-check duration against expTime but it seems like it's a non-issue, so I'll fix that up.
|
||
data = np.asarray(data, dtype=np.float32) | ||
img = afwImage.ImageF(data) | ||
maskedIm = afwImage.MaskedImageF(img) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could just do maskedIm = afwImage.MaskedImageF(afwImage.ImageF(data))
if you care about file length.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's getting a little much and harder to read 🙂
6e1609a
to
87ca43e
Compare
No description provided.