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

Adding new script "poisson_err.py" #166

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jlothringer
Copy link

Adding a new script "poisson_err.py" to add the function poisson_err.poisson_err(), which calculates Poisson confidence intervals for NUV-MAMA and FUV-MAMA 1D extracted spectra using astropy's stats.poisson_confidence_interval function. These Poisson confidence intervals are the more statistically robust way to calculate errors for data with low numbers of event counts, like in NUV and FUV data, compared to the root-N approximation used by the pipeline. This is related to the "Low_Count_Uncertainties" notebook in development here.

@sean-lockwood
Copy link
Member

sean-lockwood commented Sep 11, 2024

@jlothringer -
Do you have a copy of the test output dataset (obgh07020_PCI_x1d.fits) you want to use as a standard? We'll need to figure out how to upload it to Artifactory.

Does it use the current standard pipeline x1d file as input?

teal.print_tasknames(__name__, os.path.dirname(__file__))
Copy link
Member

Choose a reason for hiding this comment

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

Was this breaking the install? I recall @stscirij talking about removing teal code...

Copy link
Author

Choose a reason for hiding this comment

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

No, I think install was fine. I just re-installed the latest version of stenv and everything went smoothly. When importing stistools, I get the usual NMPFIT and GFIT deprectation warnings and then the usual TEAL package note ("The following tasks...").

@sean-lockwood
Copy link
Member

We're going to want to add a file for the Sphinx documentation here:
https://github.com/jlothringer/stistools/tree/master/doc/source

Most of these files are pretty minimal, pointing to the docstring. We can iterate on the contents/format of the docstring we want to use for this purpose.

@jlothringer
Copy link
Author

@jlothringer - Do you have a copy of the test output dataset (obgh07020_PCI_x1d.fits) you want to use as a standard? We'll need to figure out how to upload it to Artifactory.

Does it use the current standard pipeline x1d file as input?

Yes, I've uploaded both test input and output datasets to Box here: https://stsci.box.com/s/md0i61m1hdapbuse90vgtg0agr7km88u

And they indeed used a standard x1d file as input (which I've also uploaded there).

@sean-lockwood
Copy link
Member

I've "deployed" the test input and truth files to our artifactory instance.

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