-
Notifications
You must be signed in to change notification settings - Fork 23
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
base: master
Are you sure you want to change the base?
Conversation
@jlothringer - Does it use the current standard pipeline |
teal.print_tasknames(__name__, os.path.dirname(__file__)) |
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.
Was this breaking the install? I recall @stscirij talking about removing teal
code...
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.
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...").
We're going to want to add a file for the Sphinx documentation here: 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. |
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). |
I've "deployed" the test input and truth files to our artifactory instance. |
@jlothringer - First, confirm we have the same terminology for remotes: git remote -vv If
You should then add an git remote add upstream [email protected]:spacetelescope/stistools.git Now you can fetch changes to your system: git fetch upstream And then rebase, which will re-run your commits on top of the current git rebase upstream/master There may be merge conflicts to resolve at this point. After dealing with these, you'll then push to your fork: git push --force origin master (Again, this assumes This will update the pull request. Let me know if you have any questions or encounter any issues! We'll then be able to install and run tests "locally" on a server: cd stistools
pip install '.[test]'
pytest --bigdata --slow tests/test_poisson_error.py |
Additionally, you'll need to modify the |
…an update to __init__.py so stistools sees the new script.
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.