This commit is contained in:
Никита Тырин 2025-05-18 15:36:56 +03:00
parent a8cf963dee
commit 982e5e8680

View File

@ -1,8 +1,5 @@
# uplim # uplim
test
ART-XC upper limits django application ART-XC upper limits django application
## Management commands ## Management commands
@ -13,13 +10,16 @@ Allows to populate the database with data for a survey in healpix format. Takes
Syntax: python manage.py load_survey --counts='*path_to_counts_map*' --exposure='*path_to_exposure_map*' --survey_number=*integer survey number* --batch_size=*number of pixels to insert in one transaction* Syntax: python manage.py load_survey --counts='*path_to_counts_map*' --exposure='*path_to_exposure_map*' --survey_number=*integer survey number* --batch_size=*number of pixels to insert in one transaction*
- set_contaminated
Load catalog.dat catalog into the database or update it. Set the contamination flag based on the catalog of sources (catalog.dat file). Includes a --reset option to reset the flag to False on all pixels.
Syntax: python manage.py set_contaminated --catalog='*path to catalog.dat*'
## Models (models.py) ## Models (models.py)
- Survey:
- survey number
- Pixel: - Pixel:
- survey foreign key - survey number
- hpid (healpix pixel id) - hpid (healpix pixel id)
- counts - counts
- exposure - exposure
@ -27,8 +27,6 @@ Syntax: python manage.py load_survey --counts='*path_to_counts_map*' --exposure=
## Views (views.py) ## Views (views.py)
**Before public deployment views providing direct pixel data should be altered to not include it in the response json.**
- PixelAggregateView: - PixelAggregateView:
For testing, outputs the aggregated data across specified surveys for a healpix pixel. For testing, outputs the aggregated data across specified surveys for a healpix pixel.
@ -36,14 +34,16 @@ Syntax: python manage.py load_survey --counts='*path_to_counts_map*' --exposure=
Sum of counts and exposure over specified surveys for the specified pixel. Sum of counts and exposure over specified surveys for the specified pixel.
URL: /api/pixel-aggregate/?pixel=123&survey=1 URL: /api/pixel-aggregate/?pixel=123&survey=1
(/api/pixel-aggregate/?pixel=123&survey=1,3,5) (/api/pixel-aggregate/?pixel=123&survey=1,3,5)
(/api/pixel-aggregate/?pixel=123&survey=1-5) (/api/pixel-aggregate/?pixel=123&survey=1-5)
- UpperLimitView: - UpperLimitView:
The view providing upper limit calculation. The view providing upper limit calculation.
Returns: 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). 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). Also whether or not the apertures contain any pixels marked as contaminated, as well as a list of nearby sources.
URL: /api/upper-limit/?ra=10.0&dec=10.0&cl=.95&survey=1 (or list 1,3,5 or hyphenated range 1-5). URL: /api/upper-limit/?ra=10.0&dec=10.0&cl=.95&survey=1 (or list 1,3,5 or hyphenated range 1-5).