Skip to content

Comments

LSST ToO update#872

Merged
geordie666 merged 5 commits intomainfrom
LSST_ToO_update
Jan 30, 2026
Merged

LSST ToO update#872
geordie666 merged 5 commits intomainfrom
LSST_ToO_update

Conversation

@jbanovetz
Copy link
Contributor

This update will divide the ToO-input.ecsv list into a primary folder that grows over time (anything with -all in the name) and a smaller folder of just targets that are available right now. Fiber assign on the fly will use the smaller folders for assigning ToOs, allowing for more ToOs to be uploaded in a day.

@jbanovetz jbanovetz requested a review from geordie666 January 29, 2026 21:36
@coveralls
Copy link

coveralls commented Jan 29, 2026

Coverage Status

coverage: 41.557% (-0.03%) from 41.583%
when pulling 14b8bfd on LSST_ToO_update
into 53938da on main.

Copy link
Contributor

@geordie666 geordie666 left a comment

Choose a reason for hiding this comment

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

Thanks for your time-critical work on this @jbanovetz. And, thanks for addressing my previous (offline) review.

I have a few more comments for you to adopt (or consider) before merging this PR.


#JB enable subtables past a date (in this case corresponding to 2026/01/28)
todaymjd = Time.now().mjd
if todaymjd >= Time('2026-01-28').mjd:
Copy link
Contributor

Choose a reason for hiding this comment

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

To ensure this works automatically for reproducibility (e.g. for the alt-MTLs, etc.) you want to set this to a date in the future, as we already ran the ToOs for yesterday and today. I'd suggest '2026-01-30' and we'll try to squeeze in the first new update tomorrow?

Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably make this '2026-01-31', now. I can monitor the process on Saturday to check nothing fails.



def ledger_to_targets(toodir=None, survey="main", ecsv=True, outdir=None):
def ledger_to_targets(toodir=None, survey="main", ecsv=True, outdir=None, subtable=False):
Copy link
Contributor

Choose a reason for hiding this comment

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

As you're hardcoding subtable to always trigger after a specific date, it doesn't make sense to also include it as a kwarg. I'd remove the kwarg.

outdir : :class:`str`, optional, defaults to ``None``
If passed and not ``None``, then read the input ledger from
`toodir` but write the file of targets to `outdir`.
subtable : :class:`bool`, optional, defaults to ``True``
Copy link
Contributor

Choose a reason for hiding this comment

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

Once you've deleted the subtable kwarg, remember to also remove subtable from the docstring.

# ADM write out the results.
_write_too_files(fn, outdata, ecsv=ecsv)
# JB added if statement for writing out a subtable
if subtable:
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm OK with your approach if you find it easiest to parse, but consider whether you need two if statements; one for setting subtable and one for using it. Particularly as the subtable kwarg seems unnecessary.

Every relevant line of code for subsampling the data could presumably be embedded in a single if todaymjd >= Time('2026-01-28').mjd: block where you currently have the if subtable: block.

@jbanovetz
Copy link
Contributor Author

Thank you for reviewing! I agree with all the changes and have implemented them. Let me know if there is anything else that needs to be put in!

@geordie666
Copy link
Contributor

Thanks @jbanovetz. This looks good I'm going to merge and tag now.

@geordie666 geordie666 merged commit 5c7d08d into main Jan 30, 2026
17 of 18 checks passed
@geordie666 geordie666 deleted the LSST_ToO_update branch January 30, 2026 23:21
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.

3 participants