Skip to content

Add exptime_oir_ccd, inverse of signal_to_noise_oir_ccd#11940

Closed
lpsinger wants to merge 1 commit into
astropy:mainfrom
lpsinger:exptime_oir_ccd
Closed

Add exptime_oir_ccd, inverse of signal_to_noise_oir_ccd#11940
lpsinger wants to merge 1 commit into
astropy:mainfrom
lpsinger:exptime_oir_ccd

Conversation

@lpsinger
Copy link
Copy Markdown
Contributor

Description

This handy inverse function calculates the exposure time to achieve a given signal to noise ratio. The implementation is straightforward: it's just the quadratic formula.

I am using this in https://github.com/nasa/dorado-sensitivity, but I think astropy is a better home for this function.

Checklist for package maintainer(s)

This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.

  • Do the proposed changes actually accomplish desired goals?
  • Do the proposed changes follow the Astropy coding guidelines?
  • Are tests added/updated as required? If so, do they follow the Astropy testing guidelines?
  • Are docs added/updated as required? If so, do they follow the Astropy documentation guidelines?
  • Is rebase and/or squash necessary? If so, please provide the author with appropriate instructions. Also see "When to rebase and squash commits".
  • Did the CI pass? If no, are the failures related? If you need to run daily and weekly cron jobs as part of the PR, please apply the Extra CI label.
  • Is a change log needed? If yes, did the change log check pass? If no, add the no-changelog-entry-needed label.
  • Is a milestone set? Milestone must be set but astropy-bot check might be missing; do not let the green checkmark fool you.
  • At the time of adding the milestone, if the milestone set requires a backport to release branch(es), apply the appropriate backport-X.Y.x label(s) before merge.

This handy inverse function calculates the exposure time to
achieve a given signal to noise ratio. The implementation is
straightforward: it's just the quadratic formula.

I am using this in https://github.com/nasa/dorado-sensitivity,
but I think astropy is a better home for this function.
@github-actions github-actions Bot added the stats label Jul 12, 2021
@pllim
Copy link
Copy Markdown
Member

pllim commented Jul 12, 2021

This functionality feels more like astroplan to me... cc @bmorris3

@lpsinger
Copy link
Copy Markdown
Contributor Author

This is ETC functionality, not observation planning. I think it could find a nice home in a hypothetical general-purpose Astropy affiliated ETC package. STScI tools like Pandeia and STIPS are probably a bit too grand. Gunagala (https://github.com/AstroHuntsman/gunagala) looks nice, but it doesn't seem to be a very active project.

@pllim
Copy link
Copy Markdown
Member

pllim commented Jul 12, 2021

Isn't ETC tied to observation planning? Why would you need ETC if you don't plan on doing some observation? 😉

@lpsinger
Copy link
Copy Markdown
Contributor Author

At least drawing on my experience with Gemini, it seems that ETC and observation planning are traditionally treated as separate tasks. You use the ETC to explore the range of acceptable observing conditions for your science targets, and then you input those constraints into the observing tool. I would guess that people often use Astroplan in a similar manner. Astroplan does not currently have any ETC capabilities. I think it would be good to have a solid and general purpose ETC with reasonable sky background models, which you can optionally couple into Astroplan. But that goes beyond the scope of this patch.

@bsipocz
Copy link
Copy Markdown
Member

bsipocz commented Jul 12, 2021

👍 for this to be part of astroplan or a separate affiliated package. Getting an ETC into core would open up issues like we have with the observatory sites database. Internally it's said that maintaining such a database should not be part of astropy, but it's not communicated widely, and the contributions are coming for it. Having some ETC then the question would come up of what else should it support, etc.

@bmorris3
Copy link
Copy Markdown
Contributor

Hi team! Sorry for the delay.

We've had a delayed PR that does similar functionality over in astroplan at astropy/astroplan#420. When we discussed this during the last astroplan GSOC, we decided ETC calculations fall within the scope of astroplan since you can envision a use case where the observer wants to dynamically schedule targets based on the S/N achievable on a given target.

@lpsinger – would you mind looking to see how the astroplan PR's functionality compares with your implementation and see if that PR accomplishes the tasks you'd like to see supported in the astropy ecosystem? If so, we can resurrect that effort. I believe the test failures and rebases necessary to get that PR merged won't be too difficult.

@pllim pllim added Downstream Fix Required Close? Tell stale bot that this issue/PR is stale labels Jul 15, 2021
@pllim

This comment has been minimized.

@pllim
Copy link
Copy Markdown
Member

pllim commented Aug 30, 2021

Ops... Faulty bot logic. Please ignore, sorry.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Sep 3, 2021

Hi humans 👋 - this pull request hasn't had any new commits for approximately 51 years a month. I plan to close this in 30 days if the pull request doesn't have any new commits by then.

In lieu of a stalled pull request, please consider closing this and open an issue instead if a reminder is needed to revisit in the future. Maintainers may also choose to add keep-open label to keep this PR open but it is discouraged unless absolutely necessary.

If this PR still needs to be reviewed, as an author, you can rebase it to reset the clock.

If you believe I commented on this pull request incorrectly, please report this here.

@bsipocz
Copy link
Copy Markdown
Member

bsipocz commented Sep 3, 2021

@pllim - Oops, the bot went rouge a bit, approximately 51 years.

@pllim
Copy link
Copy Markdown
Member

pllim commented Sep 3, 2021

LoL! The "human readable time" is parsed by a third-party package. I will investigate. Sorry!

Update: The bug has been fixed upstream.

@github-actions github-actions Bot added the closed-by-bot Closed by stale bot label Dec 9, 2021
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 9, 2021

I'm going to close this pull request as per my previous message. If you think what is being added/fixed here is still important, please remember to open an issue to keep track of it. Thanks!

If this is the first time I am commenting on this issue, or if you believe I closed this issue incorrectly, please report this here.

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

Labels

Close? Tell stale bot that this issue/PR is stale closed-by-bot Closed by stale bot Downstream Fix Required stats

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants