uplim/README.md
2025-05-08 15:40:20 +03:00

52 lines
1.5 KiB
Markdown

# axc_ul
test
ART-XC upper limits django application
## Management commands
- load_survey
Allows to populate the database with data for a survey in healpix format. Takes about 100 minutes for an nside=4096 map to load using sqlite. Supports resuming after interruption.
Syntax: python manage.py load_survey --counts='*path_to_counts_map*' --exposure='*path_to_exposure_map*' --survey=*integer survey number*
## Models (models.py)
- Survey:
- survey number
- Pixel:
- survey foreign key
- hpid (healpix pixel id)
- counts
- exposure
- contamination flag
## Views (views.py)
**Before public deployment views providing direct pixel data should be altered to not include it in the response json.**
- PixelAggregateView:
For testing, outputs the aggregated data across specified surveys for a healpix pixel.
Returns:
Sum of counts and exposure over specified surveys for the specified pixel.
URL: /api/pixel-aggregate/?pixel=123&survey=1
(/api/pixel-aggregate/?pixel=123&survey=1,3,5)
(/api/pixel-aggregate/?pixel=123&survey=1-5)
- UpperLimitView:
The view providing upper limit calculation.
Returns:
Upper and lower limits in units of counts, count rate, and physical flux for Bayesian and classic approaches, as well as a count rate estimate and aperture photometry data (counts in the aperture, background estimate, etc).
URL: /api/upper-limit/?ra=10.0&dec=10.0&cl=.95&survey=1 (or list 1,3,5 or hyphenated range 1-5).