From 5befe3a3de8003dada36d66107a7f4eeea3ee52c Mon Sep 17 00:00:00 2001 From: Ben Sunnquist Date: Tue, 27 Feb 2024 10:52:01 -0500 Subject: [PATCH 01/33] minor change to plotting for data that was processed through the claw monitor before the model measurements were implemented --- jwql/instrument_monitors/nircam_monitors/claw_monitor.py | 1 + 1 file changed, 1 insertion(+) diff --git a/jwql/instrument_monitors/nircam_monitors/claw_monitor.py b/jwql/instrument_monitors/nircam_monitors/claw_monitor.py index b73d916c0..76d7f7145 100644 --- a/jwql/instrument_monitors/nircam_monitors/claw_monitor.py +++ b/jwql/instrument_monitors/nircam_monitors/claw_monitor.py @@ -192,6 +192,7 @@ def make_background_plots(self, plot_type='bkg'): df = df[df['stddev'] != 0] # older data has no accurate stddev measures plot_data = df['stddev'].values if plot_type == 'model': + df = df[np.isfinite(df['total_bkg'])] # the claw monitor did not track model measurements at first plot_data = df['median'].values / df['total_bkg'].values plot_expstarts = df['expstart_mjd'].values From 891fd6246d55adda1abf31f1ef5203db521adc20 Mon Sep 17 00:00:00 2001 From: Ben Sunnquist Date: Fri, 8 Mar 2024 15:54:33 -0500 Subject: [PATCH 02/33] updated pivot wavelengths with new filters --- .../nircam_monitors/claw_monitor.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/jwql/instrument_monitors/nircam_monitors/claw_monitor.py b/jwql/instrument_monitors/nircam_monitors/claw_monitor.py index 76d7f7145..3ee7c4acb 100644 --- a/jwql/instrument_monitors/nircam_monitors/claw_monitor.py +++ b/jwql/instrument_monitors/nircam_monitors/claw_monitor.py @@ -424,11 +424,13 @@ def run(self): mast_table = self.query_mast() logging.info('{} files found between {} and {}.'.format(len(mast_table), self.query_start_mjd, self.query_end_mjd)) - # Define pivot wavelengths - self.filter_wave = {'F070W': 0.704, 'F090W': 0.902, 'F115W': 1.154, 'F150W': 1.501, 'F150W2': 1.659, - 'F200W': 1.989, 'F212N': 2.121, 'F250M': 2.503, 'F277W': 2.762, 'F300M': 2.989, - 'F322W2': 3.232, 'F356W': 3.568, 'F410M': 4.082, 'F430M': 4.281, 'F444W': 4.408, - 'F480M': 4.874} + # Define pivot wavelengths - last downloaded March 8 2024 from: + # https://jwst-docs.stsci.edu/jwst-near-infrared-camera/nircam-instrumentation/nircam-filters + self.filter_wave = {'F070W': 0.704, 'F090W': 0.901, 'F115W': 1.154, 'F140M': 1.404, 'F150W': 1.501, 'F162M': 1.626, 'F164N': 1.644, + 'F150W2': 1.671, 'F182M': 1.845, 'F187N': 1.874, 'F200W': 1.99, 'F210M': 2.093, 'F212N': 2.12, 'F250M': 2.503, + 'F277W': 2.786, 'F300M': 2.996, 'F322W2': 3.247, 'F323N': 3.237, 'F335M': 3.365, 'F356W': 3.563, 'F360M': 3.621, + 'F405N': 4.055, 'F410M': 4.092, 'F430M': 4.28, 'F444W': 4.421, 'F460M': 4.624, 'F466N': 4.654, 'F470N': 4.707, + 'F480M': 4.834} # Create observation-level median stacks for each filter/pupil combo, in pixel-space combos = np.array(['{}_{}_{}_{}'.format(str(row['program']), row['observtn'], row['filter'], row['pupil']).lower() for row in mast_table]) From f9777cb88f4d40334b6a0906c80abe9bdfebf1e3 Mon Sep 17 00:00:00 2001 From: Ben Sunnquist Date: Wed, 13 Mar 2024 11:05:25 -0400 Subject: [PATCH 03/33] fixed background prediction call for narrow and medium bands to use correct pivot wavelength --- jwql/instrument_monitors/nircam_monitors/claw_monitor.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jwql/instrument_monitors/nircam_monitors/claw_monitor.py b/jwql/instrument_monitors/nircam_monitors/claw_monitor.py index 3ee7c4acb..fa31cb66d 100644 --- a/jwql/instrument_monitors/nircam_monitors/claw_monitor.py +++ b/jwql/instrument_monitors/nircam_monitors/claw_monitor.py @@ -301,7 +301,11 @@ def process(self): # Get predicted background level using JWST background tool ra, dec = hdu[1].header['RA_V1'], hdu[1].header['DEC_V1'] - wv = self.filter_wave[self.fltr.upper()] + if ('N' in self.pupil.upper()) | ('M' in self.pupil.upper()): + fltr_wv = self.pupil.upper() + else: + fltr_wv = self.fltr.upper() + wv = self.filter_wave[fltr_wv] date = hdu[0].header['DATE-BEG'] doy = int(Time(date).yday.split(':')[1]) try: From 695780e00929d893555ecdfeb7427a067cf2a9fc Mon Sep 17 00:00:00 2001 From: Mees Fix Date: Fri, 15 Mar 2024 09:40:02 -0400 Subject: [PATCH 04/33] updating lines to exclude from new bokeh plots --- .../jwql/monitor_pages/monitor_bad_pixel_bokeh.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/jwql/website/apps/jwql/monitor_pages/monitor_bad_pixel_bokeh.py b/jwql/website/apps/jwql/monitor_pages/monitor_bad_pixel_bokeh.py index c7f6db8af..ee2c902f0 100755 --- a/jwql/website/apps/jwql/monitor_pages/monitor_bad_pixel_bokeh.py +++ b/jwql/website/apps/jwql/monitor_pages/monitor_bad_pixel_bokeh.py @@ -98,7 +98,16 @@ def modify_bokeh_saved_html(self): lines_to_remove = ["", '', ' ', - ''] + '', + ' '] # Our Django-related lines that need to be at the top of the file hstring = """href="{{'/jwqldb/%s_bad_pixel_stats'%inst.lower()}}" name=test_link class="btn btn-primary my-2" type="submit">Go to JWQLDB page""" From 7ab4f50b04bdb2a3315a7f5895783f5a30512c79 Mon Sep 17 00:00:00 2001 From: Bryan Hilbert Date: Fri, 15 Mar 2024 15:47:09 -0400 Subject: [PATCH 05/33] interactive preview fix --- jwql/utils/interactive_preview_image.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jwql/utils/interactive_preview_image.py b/jwql/utils/interactive_preview_image.py index 1ffd2ab7b..c8a090a28 100644 --- a/jwql/utils/interactive_preview_image.py +++ b/jwql/utils/interactive_preview_image.py @@ -23,6 +23,7 @@ from astropy.io import fits from astropy.visualization import ZScaleInterval, MinMaxInterval, PercentileInterval from astropy.wcs import WCS +from bokeh import events from bokeh.embed import components from bokeh.layouts import gridplot, layout from bokeh.models import ( @@ -554,7 +555,7 @@ def add_interactive_controls(self, images, color_bars): # JS callbacks for client side controls # set alternate image visibility when scale selection changes - scale_group.js_on_click(CustomJS(args={'i1': images[0], 'c1': color_bars[0], + scale_group.js_on_change('labels', CustomJS(args={'i1': images[0], 'c1': color_bars[0], 'i2': images[1], 'c2': color_bars[1]}, code=""" if (i1.visible == true) { @@ -594,10 +595,10 @@ def add_interactive_controls(self, images, color_bars): limit_high.js_link('value', color_bars[i].color_mapper, 'high') # reset boxes to preset range on button click - reset.js_on_click(limit_reset) + reset.js_on_event(events.ButtonClick, limit_reset) # also reset when swapping limit style - scale_group.js_on_click(limit_reset) + scale_group.js_on_change('labels', limit_reset) # return widgets spacer = Spacer(height=20) From 2e32ea9f1d01ce0cd13d096e0a41658a0c37e24d Mon Sep 17 00:00:00 2001 From: Bryan Hilbert Date: Sat, 16 Mar 2024 21:39:28 -0400 Subject: [PATCH 06/33] All buttons are now working --- jwql/utils/interactive_preview_image.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/jwql/utils/interactive_preview_image.py b/jwql/utils/interactive_preview_image.py index c8a090a28..1845e0d91 100644 --- a/jwql/utils/interactive_preview_image.py +++ b/jwql/utils/interactive_preview_image.py @@ -23,7 +23,6 @@ from astropy.io import fits from astropy.visualization import ZScaleInterval, MinMaxInterval, PercentileInterval from astropy.wcs import WCS -from bokeh import events from bokeh.embed import components from bokeh.layouts import gridplot, layout from bokeh.models import ( @@ -555,7 +554,7 @@ def add_interactive_controls(self, images, color_bars): # JS callbacks for client side controls # set alternate image visibility when scale selection changes - scale_group.js_on_change('labels', CustomJS(args={'i1': images[0], 'c1': color_bars[0], + scale_group.js_on_change('active', CustomJS(args={'i1': images[0], 'c1': color_bars[0], 'i2': images[1], 'c2': color_bars[1]}, code=""" if (i1.visible == true) { @@ -595,10 +594,10 @@ def add_interactive_controls(self, images, color_bars): limit_high.js_link('value', color_bars[i].color_mapper, 'high') # reset boxes to preset range on button click - reset.js_on_event(events.ButtonClick, limit_reset) + reset.js_on_event('button_click', limit_reset) # also reset when swapping limit style - scale_group.js_on_change('labels', limit_reset) + scale_group.js_on_change('active', limit_reset) # return widgets spacer = Spacer(height=20) From 81966439dda76ce0d69840c5262cba966a6024f0 Mon Sep 17 00:00:00 2001 From: Bradley Sappington Date: Mon, 18 Mar 2024 16:43:14 -0400 Subject: [PATCH 07/33] fix New Group button --- jwql/website/apps/jwql/templates/view_exposure.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jwql/website/apps/jwql/templates/view_exposure.html b/jwql/website/apps/jwql/templates/view_exposure.html index 7b9d71856..2a9e5cf2f 100644 --- a/jwql/website/apps/jwql/templates/view_exposure.html +++ b/jwql/website/apps/jwql/templates/view_exposure.html @@ -18,7 +18,7 @@

Exposure {{ group_root }}

Observation:
Visit:
- +
Visit Status: {{ basic_info.visit_status }}
@@ -264,7 +264,7 @@
Submit Anomaly for Group
{% elif 'uncal' in suffixes %} {% elif suffixes|length == 1 %} - + {% else %} Unable to show image for: {{suffixes}} {% endif %} From 49b997daf426455dc93f0442b3ae5060c5802e24 Mon Sep 17 00:00:00 2001 From: Mees Fix Date: Tue, 19 Mar 2024 10:53:03 -0400 Subject: [PATCH 08/33] v1.2.5 changelog --- CHANGES.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 9d4cdc1a5..01be6e18f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,5 +1,21 @@ ## What's Changed +1.2.5 (2024-03-19) +================== + +Web Application +~~~~~~~~~~~~~~~ +- Fix Bokeh `file_html` Call by @mfixstsci +- Update Bad Pix Exclude Line by @mfixstsci +- Interactive preview image - updates for Bokeh 3 by @bhilbert4 + +Project & API Documentation +~~~~~~~~~~~~~~~~~~~~~~~~~~~ +- Allow creation of pngs from 3D and 4D arrays by @bhilbert4 +- Add max length to charfield by @BradleySappington +- Header fix by @BradleySappington + + 1.2.4 (2024-03-11) ================== From 427f01d9e3bba34e07548b05c4245d9f7d2a9439 Mon Sep 17 00:00:00 2001 From: Mees Fix Date: Tue, 19 Mar 2024 10:54:35 -0400 Subject: [PATCH 09/33] v1.2.5 changelog --- CHANGES.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 9d4cdc1a5..01be6e18f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,5 +1,21 @@ ## What's Changed +1.2.5 (2024-03-19) +================== + +Web Application +~~~~~~~~~~~~~~~ +- Fix Bokeh `file_html` Call by @mfixstsci +- Update Bad Pix Exclude Line by @mfixstsci +- Interactive preview image - updates for Bokeh 3 by @bhilbert4 + +Project & API Documentation +~~~~~~~~~~~~~~~~~~~~~~~~~~~ +- Allow creation of pngs from 3D and 4D arrays by @bhilbert4 +- Add max length to charfield by @BradleySappington +- Header fix by @BradleySappington + + 1.2.4 (2024-03-11) ================== From dd7c6508b844f81ca40a214cb635095c6290415f Mon Sep 17 00:00:00 2001 From: Bradley Sappington Date: Wed, 20 Mar 2024 09:02:53 -0400 Subject: [PATCH 10/33] remove test code --- jwql/website/apps/jwql/data_containers.py | 1 - 1 file changed, 1 deletion(-) diff --git a/jwql/website/apps/jwql/data_containers.py b/jwql/website/apps/jwql/data_containers.py index 5c162d4bf..1300a6b6a 100644 --- a/jwql/website/apps/jwql/data_containers.py +++ b/jwql/website/apps/jwql/data_containers.py @@ -475,7 +475,6 @@ def get_additional_exposure_info(root_file_infos, image_info): additional_info['TITLE'] = header.get('TITLE', 'N/A') additional_info['PI_NAME'] = header.get('PI_NAME', 'N/A') additional_info['TARGNAME'] = header.get('TARGPROP', 'N/A') - additional_info['BRADTEST'] = header.get('BRADTEST', 'N/A') # For the exposure level (i.e. multiple files) present the target # RA and Dec. For the image level, give RA_REF, DEC_REF, since those From fe35a27dac7aa8301ba0c42e00598789c114dead Mon Sep 17 00:00:00 2001 From: Bradley Sappington Date: Wed, 20 Mar 2024 10:36:53 -0400 Subject: [PATCH 11/33] update defaults for empty charfields --- jwql/tests/test_data_containers.py | 52 +++++++-------- jwql/utils/constants.py | 3 + .../0020_alter_proposal_category_and_more.py | 63 +++++++++++++++++++ jwql/website/apps/jwql/models.py | 21 ++++--- 4 files changed, 103 insertions(+), 36 deletions(-) create mode 100644 jwql/website/apps/jwql/migrations/0020_alter_proposal_category_and_more.py diff --git a/jwql/tests/test_data_containers.py b/jwql/tests/test_data_containers.py index 7c4f68401..195aa4093 100644 --- a/jwql/tests/test_data_containers.py +++ b/jwql/tests/test_data_containers.py @@ -31,7 +31,7 @@ import pandas as pd import pytest -from jwql.utils.constants import ON_GITHUB_ACTIONS +from jwql.utils.constants import ON_GITHUB_ACTIONS, DEFAULT_MODEL_CHARFIELD os.environ.setdefault("DJANGO_SETTINGS_MODULE", "jwql.website.jwql_proj.settings") @@ -45,7 +45,7 @@ from jwql.utils.utils import get_config # noqa: E402 (module level import not at top of file) from jwql.website.apps.jwql.models import RootFileInfo - + @pytest.mark.skipif(ON_GITHUB_ACTIONS, reason='Requires access to django models.') def test_build_table(): tab = data_containers.build_table('filesystem_general') @@ -607,42 +607,42 @@ def test_mast_query_by_rootname(): instrument = 'NIRCam' rootname1 = 'jw02767002001_02103_00005_nrcb4' dict_stuff = data_containers.mast_query_by_rootname(instrument, rootname1) - defaults = dict(filter=dict_stuff.get('filter', ''), - detector=dict_stuff.get('detector', ''), - exp_type=dict_stuff.get('exp_type', ''), - read_pat=dict_stuff.get('readpatt', ''), - grating=dict_stuff.get('grating', ''), + defaults = dict(filter=dict_stuff.get('filter', DEFAULT_MODEL_CHARFIELD), + detector=dict_stuff.get('detector', DEFAULT_MODEL_CHARFIELD), + exp_type=dict_stuff.get('exp_type', DEFAULT_MODEL_CHARFIELD), + read_pat=dict_stuff.get('readpatt', DEFAULT_MODEL_CHARFIELD), + grating=dict_stuff.get('grating', DEFAULT_MODEL_CHARFIELD), patt_num=dict_stuff.get('patt_num', 0), - aperture=dict_stuff.get('apername', ''), - subarray=dict_stuff.get('subarray', ''), - pupil=dict_stuff.get('pupil', '')) + aperture=dict_stuff.get('apername', DEFAULT_MODEL_CHARFIELD), + subarray=dict_stuff.get('subarray', DEFAULT_MODEL_CHARFIELD), + pupil=dict_stuff.get('pupil', DEFAULT_MODEL_CHARFIELD)) assert isinstance(defaults, dict) rootname2 = 'jw02084001001_04103_00001-seg003_nrca3' dict_stuff = data_containers.mast_query_by_rootname(instrument, rootname2) - defaults = dict(filter=dict_stuff.get('filter', ''), - detector=dict_stuff.get('detector', ''), - exp_type=dict_stuff.get('exp_type', ''), - read_pat=dict_stuff.get('readpatt', ''), - grating=dict_stuff.get('grating', ''), + defaults = dict(filter=dict_stuff.get('filter', DEFAULT_MODEL_CHARFIELD), + detector=dict_stuff.get('detector', DEFAULT_MODEL_CHARFIELD), + exp_type=dict_stuff.get('exp_type', DEFAULT_MODEL_CHARFIELD), + read_pat=dict_stuff.get('readpatt', DEFAULT_MODEL_CHARFIELD), + grating=dict_stuff.get('grating', DEFAULT_MODEL_CHARFIELD), patt_num=dict_stuff.get('patt_num', 0), - aperture=dict_stuff.get('apername', ''), - subarray=dict_stuff.get('subarray', ''), - pupil=dict_stuff.get('pupil', '')) + aperture=dict_stuff.get('apername', DEFAULT_MODEL_CHARFIELD), + subarray=dict_stuff.get('subarray', DEFAULT_MODEL_CHARFIELD), + pupil=dict_stuff.get('pupil', DEFAULT_MODEL_CHARFIELD)) assert isinstance(defaults, dict) instrument2 = 'FGS' rootname3 = 'jw01029003001_06201_00001_guider2' dict_stuff = data_containers.mast_query_by_rootname(instrument2, rootname3) - defaults = dict(filter=dict_stuff.get('filter', ''), - detector=dict_stuff.get('detector', ''), - exp_type=dict_stuff.get('exp_type', ''), - read_pat=dict_stuff.get('readpatt', ''), - grating=dict_stuff.get('grating', ''), + defaults = dict(filter=dict_stuff.get('filter', DEFAULT_MODEL_CHARFIELD), + detector=dict_stuff.get('detector', DEFAULT_MODEL_CHARFIELD), + exp_type=dict_stuff.get('exp_type', DEFAULT_MODEL_CHARFIELD), + read_pat=dict_stuff.get('readpatt', DEFAULT_MODEL_CHARFIELD), + grating=dict_stuff.get('grating', DEFAULT_MODEL_CHARFIELD), patt_num=dict_stuff.get('patt_num', 0), - aperture=dict_stuff.get('apername', ''), - subarray=dict_stuff.get('subarray', ''), - pupil=dict_stuff.get('pupil', '')) + aperture=dict_stuff.get('apername', DEFAULT_MODEL_CHARFIELD), + subarray=dict_stuff.get('subarray', DEFAULT_MODEL_CHARFIELD), + pupil=dict_stuff.get('pupil', DEFAULT_MODEL_CHARFIELD)) assert isinstance(defaults, dict) diff --git a/jwql/utils/constants.py b/jwql/utils/constants.py index 92e2774d5..6ea90e172 100644 --- a/jwql/utils/constants.py +++ b/jwql/utils/constants.py @@ -364,6 +364,9 @@ "wfscmb", ] +#Default Model Values +DEFAULT_MODEL_CHARFIELD = "empty" + # Filename Component Lengths FILE_AC_CAR_ID_LEN = 4 FILE_AC_O_ID_LEN = 3 diff --git a/jwql/website/apps/jwql/migrations/0020_alter_proposal_category_and_more.py b/jwql/website/apps/jwql/migrations/0020_alter_proposal_category_and_more.py new file mode 100644 index 000000000..afdc7686c --- /dev/null +++ b/jwql/website/apps/jwql/migrations/0020_alter_proposal_category_and_more.py @@ -0,0 +1,63 @@ +# Generated by Django 4.1.7 on 2024-03-20 14:34 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('jwql', '0019_alter_fgsreadnoisequeryhistory_aperture_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='proposal', + name='category', + field=models.CharField(default='empty', help_text='Category Type', max_length=10), + ), + migrations.AlterField( + model_name='proposal', + name='thumbnail_path', + field=models.CharField(default='empty', help_text='Path to the proposal thumbnail', max_length=1000), + ), + migrations.AlterField( + model_name='rootfileinfo', + name='aperture', + field=models.CharField(blank=True, default='empty', help_text='Aperture', max_length=40, null=True), + ), + migrations.AlterField( + model_name='rootfileinfo', + name='detector', + field=models.CharField(blank=True, default='empty', help_text='Detector', max_length=40, null=True), + ), + migrations.AlterField( + model_name='rootfileinfo', + name='exp_type', + field=models.CharField(blank=True, default='empty', help_text='Exposure Type', max_length=40, null=True), + ), + migrations.AlterField( + model_name='rootfileinfo', + name='filter', + field=models.CharField(blank=True, default='empty', help_text='Instrument name', max_length=7, null=True), + ), + migrations.AlterField( + model_name='rootfileinfo', + name='grating', + field=models.CharField(blank=True, default='empty', help_text='Grating', max_length=40, null=True), + ), + migrations.AlterField( + model_name='rootfileinfo', + name='pupil', + field=models.CharField(blank=True, default='empty', help_text='Pupil', max_length=40, null=True), + ), + migrations.AlterField( + model_name='rootfileinfo', + name='read_patt', + field=models.CharField(blank=True, default='empty', help_text='Read Pattern', max_length=40, null=True), + ), + migrations.AlterField( + model_name='rootfileinfo', + name='subarray', + field=models.CharField(blank=True, default='empty', help_text='Subarray', max_length=40, null=True), + ), + ] diff --git a/jwql/website/apps/jwql/models.py b/jwql/website/apps/jwql/models.py index 5a51b7428..74eb008c6 100644 --- a/jwql/website/apps/jwql/models.py +++ b/jwql/website/apps/jwql/models.py @@ -31,6 +31,7 @@ from django.db import models from jwql.utils.constants import ( + DEFAULT_MODEL_CHARFIELD, MAX_LEN_APERTURE, MAX_LEN_DETECTOR, MAX_LEN_FILTER, @@ -74,9 +75,9 @@ class Proposal(models.Model): """A class defining the model used to hold information about a given proposal""" # Fields prop_id = models.CharField(max_length=5, help_text="5-digit proposal ID string") - thumbnail_path = models.CharField(max_length=MAX_LEN_PATH, help_text='Path to the proposal thumbnail', default='') + thumbnail_path = models.CharField(max_length=MAX_LEN_PATH, help_text='Path to the proposal thumbnail', default=DEFAULT_MODEL_CHARFIELD) archive = models.ForeignKey(Archive, blank=False, null=False, on_delete=models.CASCADE) - category = models.CharField(max_length=10, help_text="Category Type", default='') + category = models.CharField(max_length=10, help_text="Category Type", default=DEFAULT_MODEL_CHARFIELD) # Metadata class Meta: @@ -119,15 +120,15 @@ class RootFileInfo(models.Model): proposal = models.CharField(max_length=MAX_LEN_PROPOSAL, help_text="5-digit proposal ID string") root_name = models.TextField(primary_key=True, max_length=300) viewed = models.BooleanField(default=False) - filter = models.CharField(max_length=MAX_LEN_FILTER, help_text="Instrument name", default='', null=True, blank=True) - aperture = models.CharField(max_length=MAX_LEN_APERTURE, help_text="Aperture", default='', null=True, blank=True) - detector = models.CharField(max_length=MAX_LEN_DETECTOR, help_text="Detector", default='', null=True, blank=True) + filter = models.CharField(max_length=MAX_LEN_FILTER, help_text="Instrument name", default=DEFAULT_MODEL_CHARFIELD, null=True, blank=True) + aperture = models.CharField(max_length=MAX_LEN_APERTURE, help_text="Aperture", default=DEFAULT_MODEL_CHARFIELD, null=True, blank=True) + detector = models.CharField(max_length=MAX_LEN_DETECTOR, help_text="Detector", default=DEFAULT_MODEL_CHARFIELD, null=True, blank=True) read_patt_num = models.IntegerField(help_text='Read Pattern Number', default=0) - read_patt = models.CharField(max_length=MAX_LEN_READPATTERN, help_text="Read Pattern", default='', null=True, blank=True) - grating = models.CharField(max_length=MAX_LEN_GRATING, help_text="Grating", default='', null=True, blank=True) - subarray = models.CharField(max_length=MAX_LEN_SUBARRAY, help_text="Subarray", default='', null=True, blank=True) - pupil = models.CharField(max_length=MAX_LEN_PUPIL, help_text="Pupil", default='', null=True, blank=True) - exp_type = models.CharField(max_length=MAX_LEN_TYPE, help_text="Exposure Type", default='', null=True, blank=True) + read_patt = models.CharField(max_length=MAX_LEN_READPATTERN, help_text="Read Pattern", default=DEFAULT_MODEL_CHARFIELD, null=True, blank=True) + grating = models.CharField(max_length=MAX_LEN_GRATING, help_text="Grating", default=DEFAULT_MODEL_CHARFIELD, null=True, blank=True) + subarray = models.CharField(max_length=MAX_LEN_SUBARRAY, help_text="Subarray", default=DEFAULT_MODEL_CHARFIELD, null=True, blank=True) + pupil = models.CharField(max_length=MAX_LEN_PUPIL, help_text="Pupil", default=DEFAULT_MODEL_CHARFIELD, null=True, blank=True) + exp_type = models.CharField(max_length=MAX_LEN_TYPE, help_text="Exposure Type", default=DEFAULT_MODEL_CHARFIELD, null=True, blank=True) expstart = models.FloatField(help_text='Exposure Start Time', default=0.0) # Metadata From 9121cb1899417eb8b67155c6dc32eec09156a5da Mon Sep 17 00:00:00 2001 From: Bradley Sappington Date: Wed, 20 Mar 2024 10:37:19 -0400 Subject: [PATCH 12/33] check for emptys on each run of archive_database_update --- .../apps/jwql/archive_database_update.py | 50 ++++++++++++------- 1 file changed, 33 insertions(+), 17 deletions(-) diff --git a/jwql/website/apps/jwql/archive_database_update.py b/jwql/website/apps/jwql/archive_database_update.py index 071df24a8..46dba0b39 100755 --- a/jwql/website/apps/jwql/archive_database_update.py +++ b/jwql/website/apps/jwql/archive_database_update.py @@ -26,7 +26,7 @@ Use the '--fill_empty' argument to provide a model and field. Updates ALL fields for any model with empty/null/0 specified field $ python archive_database_update.py --fill_empty rootfileinfo expstart WARNING: Not all fields will be populated by all model objects. This will result in updates that may not be necessary. - While this will not disturb the data, it has the potential to increase run time. + While this will not disturb the data, it has the potential to increase run time. Select the field that is most pertient to the models you need updated minimize run time Use the 'update' argument to update every rootfileinfo data model with the most complete information from MAST @@ -49,6 +49,7 @@ from django.apps import apps from jwql.utils.protect_module import lock_module +from jwql.utils.constants import DEFAULT_MODEL_CHARFIELD # These lines are needed in order to use the Django models in a standalone # script (as opposed to code run as a result of a webpage request). If these @@ -159,6 +160,14 @@ def get_updates(update_database): create_archived_proposals_context(inst) +@log_info +@log_fail +def cleanup_past_runs(): + logging.debug("Starting cleanup_past_runs") + rootfileinfo_field_set = ["filter", "detector", "exp_type", "readpatt", "grating", "patt_num", "apername", "subarray", "pupil", "expstart"] + # Consume iterator created in map with list in order to make it run + list(map(lambda x: fill_empty_model("rootfileinfo", x), rootfileinfo_field_set)) + logging.debug("Finished cleanup_past_runs") def get_all_possible_filenames_for_proposal(instrument, proposal_num): """Wrapper around a MAST query for filenames from a given instrument/proposal @@ -332,15 +341,15 @@ def update_database_table(update, instrument, prop, obs, thumbnail, obsfiles, ty # Updating defaults only on update or creation to prevent call to mast_query_by_rootname on every file name. defaults_dict = mast_query_by_rootname(instrument, file) - defaults = dict(filter=defaults_dict.get('filter', ''), - detector=defaults_dict.get('detector', ''), - exp_type=defaults_dict.get('exp_type', ''), - read_patt=defaults_dict.get('readpatt', ''), - grating=defaults_dict.get('grating', ''), + defaults = dict(filter=defaults_dict.get('filter', DEFAULT_MODEL_CHARFIELD), + detector=defaults_dict.get('detector', DEFAULT_MODEL_CHARFIELD), + exp_type=defaults_dict.get('exp_type', DEFAULT_MODEL_CHARFIELD), + read_patt=defaults_dict.get('readpatt', DEFAULT_MODEL_CHARFIELD), + grating=defaults_dict.get('grating', DEFAULT_MODEL_CHARFIELD), read_patt_num=defaults_dict.get('patt_num', 0), - aperture=defaults_dict.get('apername', ''), - subarray=defaults_dict.get('subarray', ''), - pupil=defaults_dict.get('pupil', ''), + aperture=defaults_dict.get('apername', DEFAULT_MODEL_CHARFIELD), + subarray=defaults_dict.get('subarray', DEFAULT_MODEL_CHARFIELD), + pupil=defaults_dict.get('pupil', DEFAULT_MODEL_CHARFIELD), expstart=defaults_dict.get('expstart', 0.0)) for key, value in defaults.items(): @@ -387,6 +396,12 @@ def fill_empty_model(model_name, model_field): except ValueError: pass + # filter(field__exact=DEFAULT_MODEL_CHARFIELD) + try: + empty_models = model.objects.filter(**{model_field_empty: DEFAULT_MODEL_CHARFIELD}) + except ValueError: + pass + # filter(field=0) try: zero_models = model.objects.filter(**{model_field: 0}) @@ -458,15 +473,15 @@ def fill_empty_rootfileinfo(rootfileinfo_set): for rootfileinfo_mod in rootfileinfo_set: defaults_dict = mast_query_by_rootname(rootfileinfo_mod.instrument, rootfileinfo_mod.root_name) - defaults = dict(filter=defaults_dict.get('filter', ''), - detector=defaults_dict.get('detector', ''), - exp_type=defaults_dict.get('exp_type', ''), - read_patt=defaults_dict.get('readpatt', ''), - grating=defaults_dict.get('grating', ''), + defaults = dict(filter=defaults_dict.get('filter', DEFAULT_MODEL_CHARFIELD), + detector=defaults_dict.get('detector', DEFAULT_MODEL_CHARFIELD), + exp_type=defaults_dict.get('exp_type', DEFAULT_MODEL_CHARFIELD), + read_patt=defaults_dict.get('readpatt', DEFAULT_MODEL_CHARFIELD), + grating=defaults_dict.get('grating', DEFAULT_MODEL_CHARFIELD), read_patt_num=defaults_dict.get('patt_num', 0), - aperture=defaults_dict.get('apername', ''), - subarray=defaults_dict.get('subarray', ''), - pupil=defaults_dict.get('pupil', ''), + aperture=defaults_dict.get('apername', DEFAULT_MODEL_CHARFIELD), + subarray=defaults_dict.get('subarray', DEFAULT_MODEL_CHARFIELD), + pupil=defaults_dict.get('pupil', DEFAULT_MODEL_CHARFIELD), expstart=defaults_dict.get('expstart', 0.0)) for key, value in defaults.items(): @@ -496,6 +511,7 @@ def protected_code(update_database, fill_empty_list): fill_empty_model(fill_empty_list[0], fill_empty_list[1]) else: get_updates(update_database) + cleanup_past_runs() if __name__ == '__main__': From 3a253d0763e2c5f10a72b773bceda32f7dffaa03 Mon Sep 17 00:00:00 2001 From: Bradley Sappington Date: Thu, 21 Mar 2024 08:29:02 -0400 Subject: [PATCH 13/33] update field spelling --- jwql/website/apps/jwql/archive_database_update.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jwql/website/apps/jwql/archive_database_update.py b/jwql/website/apps/jwql/archive_database_update.py index 46dba0b39..9f74a8012 100755 --- a/jwql/website/apps/jwql/archive_database_update.py +++ b/jwql/website/apps/jwql/archive_database_update.py @@ -163,11 +163,11 @@ def get_updates(update_database): @log_info @log_fail def cleanup_past_runs(): - logging.debug("Starting cleanup_past_runs") - rootfileinfo_field_set = ["filter", "detector", "exp_type", "readpatt", "grating", "patt_num", "apername", "subarray", "pupil", "expstart"] + logging.info("Starting cleanup_past_runs") + rootfileinfo_field_set = ["filter", "detector", "exp_type", "read_patt", "grating", "patt_num", "aperture", "subarray", "pupil", "expstart"] # Consume iterator created in map with list in order to make it run list(map(lambda x: fill_empty_model("rootfileinfo", x), rootfileinfo_field_set)) - logging.debug("Finished cleanup_past_runs") + logging.info("Finished cleanup_past_runs") def get_all_possible_filenames_for_proposal(instrument, proposal_num): """Wrapper around a MAST query for filenames from a given instrument/proposal From a61b663abc79efd5c55b4d59eec4a2cd999f9f59 Mon Sep 17 00:00:00 2001 From: Bradley Sappington Date: Fri, 22 Mar 2024 10:39:22 -0400 Subject: [PATCH 14/33] update patt_num to read_patt_num --- jwql/website/apps/jwql/archive_database_update.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jwql/website/apps/jwql/archive_database_update.py b/jwql/website/apps/jwql/archive_database_update.py index 9f74a8012..f0584ee03 100755 --- a/jwql/website/apps/jwql/archive_database_update.py +++ b/jwql/website/apps/jwql/archive_database_update.py @@ -164,7 +164,7 @@ def get_updates(update_database): @log_fail def cleanup_past_runs(): logging.info("Starting cleanup_past_runs") - rootfileinfo_field_set = ["filter", "detector", "exp_type", "read_patt", "grating", "patt_num", "aperture", "subarray", "pupil", "expstart"] + rootfileinfo_field_set = ["filter", "detector", "exp_type", "read_patt", "grating", "read_patt_num", "aperture", "subarray", "pupil", "expstart"] # Consume iterator created in map with list in order to make it run list(map(lambda x: fill_empty_model("rootfileinfo", x), rootfileinfo_field_set)) logging.info("Finished cleanup_past_runs") From 35c1cf8aeebb19558869ba08c631ccb2a5c4b448 Mon Sep 17 00:00:00 2001 From: Bradley Sappington Date: Fri, 22 Mar 2024 12:49:27 -0400 Subject: [PATCH 15/33] some fields are okay for default --- .../apps/jwql/archive_database_update.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/jwql/website/apps/jwql/archive_database_update.py b/jwql/website/apps/jwql/archive_database_update.py index f0584ee03..5c8ef0997 100755 --- a/jwql/website/apps/jwql/archive_database_update.py +++ b/jwql/website/apps/jwql/archive_database_update.py @@ -346,7 +346,7 @@ def update_database_table(update, instrument, prop, obs, thumbnail, obsfiles, ty exp_type=defaults_dict.get('exp_type', DEFAULT_MODEL_CHARFIELD), read_patt=defaults_dict.get('readpatt', DEFAULT_MODEL_CHARFIELD), grating=defaults_dict.get('grating', DEFAULT_MODEL_CHARFIELD), - read_patt_num=defaults_dict.get('patt_num', 0), + read_patt_num=defaults_dict.get('patt_num', 1), aperture=defaults_dict.get('apername', DEFAULT_MODEL_CHARFIELD), subarray=defaults_dict.get('subarray', DEFAULT_MODEL_CHARFIELD), pupil=defaults_dict.get('pupil', DEFAULT_MODEL_CHARFIELD), @@ -378,10 +378,14 @@ def fill_empty_model(model_name, model_field): ''' + is_proposal = (model_name == "proposal") + is_rootfileinfo = (model_name == "rootfileinfo") + rootfile_info_fields_default_ok = ["filter", "grating", "pupil"] + model_field_null = model_field + "__isnull" model_field_empty = model_field + "__exact" - model = apps.get_model('jwql', model_name) + model = apps.get_model("jwql", model_name) null_models = empty_models = zero_models = model.objects.none() # filter(field__isnull=True) @@ -398,7 +402,8 @@ def fill_empty_model(model_name, model_field): # filter(field__exact=DEFAULT_MODEL_CHARFIELD) try: - empty_models = model.objects.filter(**{model_field_empty: DEFAULT_MODEL_CHARFIELD}) + if is_proposal or model_field not in rootfile_info_fields_default_ok: + empty_models = model.objects.filter(**{model_field_empty: DEFAULT_MODEL_CHARFIELD}) except ValueError: pass @@ -411,9 +416,9 @@ def fill_empty_model(model_name, model_field): model_set = null_models | empty_models | zero_models if model_set.exists(): logging.info(f'{model_set.count()} models to be updated') - if model_name == 'proposal': + if is_proposal: fill_empty_proposals(model_set) - elif model_name == 'rootfileinfo': + elif is_rootfileinfo: fill_empty_rootfileinfo(model_set) else: logging.warning(f'Filling {model_name} model is not currently implemented') @@ -478,7 +483,7 @@ def fill_empty_rootfileinfo(rootfileinfo_set): exp_type=defaults_dict.get('exp_type', DEFAULT_MODEL_CHARFIELD), read_patt=defaults_dict.get('readpatt', DEFAULT_MODEL_CHARFIELD), grating=defaults_dict.get('grating', DEFAULT_MODEL_CHARFIELD), - read_patt_num=defaults_dict.get('patt_num', 0), + read_patt_num=defaults_dict.get('patt_num', 1), aperture=defaults_dict.get('apername', DEFAULT_MODEL_CHARFIELD), subarray=defaults_dict.get('subarray', DEFAULT_MODEL_CHARFIELD), pupil=defaults_dict.get('pupil', DEFAULT_MODEL_CHARFIELD), From 9952d7c41a47cf206284c81fe97dfdc39151d027 Mon Sep 17 00:00:00 2001 From: Bradley Sappington Date: Fri, 22 Mar 2024 14:49:34 -0400 Subject: [PATCH 16/33] update default read_patt --- jwql/website/apps/jwql/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jwql/website/apps/jwql/models.py b/jwql/website/apps/jwql/models.py index 74eb008c6..cd770cb18 100644 --- a/jwql/website/apps/jwql/models.py +++ b/jwql/website/apps/jwql/models.py @@ -123,7 +123,7 @@ class RootFileInfo(models.Model): filter = models.CharField(max_length=MAX_LEN_FILTER, help_text="Instrument name", default=DEFAULT_MODEL_CHARFIELD, null=True, blank=True) aperture = models.CharField(max_length=MAX_LEN_APERTURE, help_text="Aperture", default=DEFAULT_MODEL_CHARFIELD, null=True, blank=True) detector = models.CharField(max_length=MAX_LEN_DETECTOR, help_text="Detector", default=DEFAULT_MODEL_CHARFIELD, null=True, blank=True) - read_patt_num = models.IntegerField(help_text='Read Pattern Number', default=0) + read_patt_num = models.IntegerField(help_text='Read Pattern Number', default=1) read_patt = models.CharField(max_length=MAX_LEN_READPATTERN, help_text="Read Pattern", default=DEFAULT_MODEL_CHARFIELD, null=True, blank=True) grating = models.CharField(max_length=MAX_LEN_GRATING, help_text="Grating", default=DEFAULT_MODEL_CHARFIELD, null=True, blank=True) subarray = models.CharField(max_length=MAX_LEN_SUBARRAY, help_text="Subarray", default=DEFAULT_MODEL_CHARFIELD, null=True, blank=True) From 5b5bf4138a01a6cddb4c65611338b4ddadb050d7 Mon Sep 17 00:00:00 2001 From: Bradley Sappington Date: Fri, 22 Mar 2024 16:01:06 -0400 Subject: [PATCH 17/33] Final switch to default if None is found --- jwql/website/apps/jwql/archive_database_update.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jwql/website/apps/jwql/archive_database_update.py b/jwql/website/apps/jwql/archive_database_update.py index 5c8ef0997..5479d6632 100755 --- a/jwql/website/apps/jwql/archive_database_update.py +++ b/jwql/website/apps/jwql/archive_database_update.py @@ -490,6 +490,9 @@ def fill_empty_rootfileinfo(rootfileinfo_set): expstart=defaults_dict.get('expstart', 0.0)) for key, value in defaults.items(): + # Final check to verify no None exists + if value is None: + value = DEFAULT_MODEL_CHARFIELD setattr(rootfileinfo_mod, key, value) try: rootfileinfo_mod.save() From 6b2df34980e6029d77fe8804f4a9cc83e2831d13 Mon Sep 17 00:00:00 2001 From: Bradley Sappington Date: Fri, 22 Mar 2024 16:15:09 -0400 Subject: [PATCH 18/33] Pep8Speaks cleanup --- jwql/tests/test_data_containers.py | 2 +- jwql/utils/constants.py | 2 +- jwql/website/apps/jwql/archive_database_update.py | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/jwql/tests/test_data_containers.py b/jwql/tests/test_data_containers.py index 195aa4093..4b1f1c4ba 100644 --- a/jwql/tests/test_data_containers.py +++ b/jwql/tests/test_data_containers.py @@ -199,7 +199,6 @@ def test_get_all_proposals(): (['uncal', 'rate', 'o001_crf', 'o006_crfints', 'bad'], {'bad'})), (False, ['rate', 'uncal', 'bad', 'o006_crfints', 'o001_crf'], ['uncal', 'rate', 'o001_crf', 'o006_crfints', 'bad'])]) - def test_get_available_suffixes(untracked, input_suffixes, expected): result = data_containers.get_available_suffixes( input_suffixes, return_untracked=untracked) @@ -339,6 +338,7 @@ def test_get_anomaly_form_post_group(mocker): assert update_mock.call_count == 2 """ + @pytest.mark.skipif(ON_GITHUB_ACTIONS, reason='Requires access to django models.') def test_get_dashboard_components(): request = MockPostRequest() diff --git a/jwql/utils/constants.py b/jwql/utils/constants.py index 6ea90e172..5114542d6 100644 --- a/jwql/utils/constants.py +++ b/jwql/utils/constants.py @@ -364,7 +364,7 @@ "wfscmb", ] -#Default Model Values +# Default Model Values DEFAULT_MODEL_CHARFIELD = "empty" # Filename Component Lengths diff --git a/jwql/website/apps/jwql/archive_database_update.py b/jwql/website/apps/jwql/archive_database_update.py index 5479d6632..bb7ffe481 100755 --- a/jwql/website/apps/jwql/archive_database_update.py +++ b/jwql/website/apps/jwql/archive_database_update.py @@ -160,6 +160,7 @@ def get_updates(update_database): create_archived_proposals_context(inst) + @log_info @log_fail def cleanup_past_runs(): @@ -169,6 +170,7 @@ def cleanup_past_runs(): list(map(lambda x: fill_empty_model("rootfileinfo", x), rootfileinfo_field_set)) logging.info("Finished cleanup_past_runs") + def get_all_possible_filenames_for_proposal(instrument, proposal_num): """Wrapper around a MAST query for filenames from a given instrument/proposal From 016744fb98fa6bdf4621b6cea977e1c881a92a4a Mon Sep 17 00:00:00 2001 From: Ben Sunnquist Date: Tue, 26 Mar 2024 11:10:35 -0400 Subject: [PATCH 19/33] minor update to resolve time zone django warnings for entry dates --- jwql/instrument_monitors/nircam_monitors/claw_monitor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 jwql/instrument_monitors/nircam_monitors/claw_monitor.py diff --git a/jwql/instrument_monitors/nircam_monitors/claw_monitor.py b/jwql/instrument_monitors/nircam_monitors/claw_monitor.py old mode 100644 new mode 100755 index fa31cb66d..9978ec182 --- a/jwql/instrument_monitors/nircam_monitors/claw_monitor.py +++ b/jwql/instrument_monitors/nircam_monitors/claw_monitor.py @@ -337,7 +337,7 @@ def process(self): 'skyflat_filename': os.path.basename(self.outfile), 'doy': float(doy), 'total_bkg': float(total_bkg), - 'entry_date': datetime.datetime.now() + 'entry_date': datetime.datetime.now(datetime.timezone.utc) } entry = self.stats_table(**claw_db_entry) entry.save() @@ -476,7 +476,7 @@ def run(self): 'start_time_mjd': self.query_start_mjd, 'end_time_mjd': self.query_end_mjd, 'run_monitor': monitor_run, - 'entry_date': datetime.datetime.now()} + 'entry_date': datetime.datetime.now(datetime.timezone.utc)} entry = self.query_table(**new_entry) entry.save() From 1062bad8f01e3eae6ed56026ed95c473e1bcac9c Mon Sep 17 00:00:00 2001 From: Bradley Sappington Date: Fri, 29 Mar 2024 13:18:53 -0400 Subject: [PATCH 20/33] do initial fetch --- jwql/pull_jwql_branch.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/jwql/pull_jwql_branch.sh b/jwql/pull_jwql_branch.sh index 5544124d7..ed0dceeaa 100644 --- a/jwql/pull_jwql_branch.sh +++ b/jwql/pull_jwql_branch.sh @@ -62,6 +62,7 @@ echo "Reset: $reset"; echo "Notify: $notify $recipient"; # 1. Pull updated code from GitHub deployment branch (keep second checkout in case its already defined for some weird reason) +git fetch origin git checkout -b $branch_name --track origin/$branch_name git checkout $branch_name git fetch origin $branch_name From e72624837207fbd774bf1d66a8cf358cd7a1a3ec Mon Sep 17 00:00:00 2001 From: Bradley Sappington Date: Fri, 5 Apr 2024 14:16:51 -0400 Subject: [PATCH 21/33] add default to read_patt_num --- .../0021_alter_rootfileinfo_read_patt_num.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 jwql/website/apps/jwql/migrations/0021_alter_rootfileinfo_read_patt_num.py diff --git a/jwql/website/apps/jwql/migrations/0021_alter_rootfileinfo_read_patt_num.py b/jwql/website/apps/jwql/migrations/0021_alter_rootfileinfo_read_patt_num.py new file mode 100644 index 000000000..96f6e6d58 --- /dev/null +++ b/jwql/website/apps/jwql/migrations/0021_alter_rootfileinfo_read_patt_num.py @@ -0,0 +1,18 @@ +# Generated by Django 4.1.7 on 2024-04-05 18:08 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('jwql', '0020_alter_proposal_category_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='rootfileinfo', + name='read_patt_num', + field=models.IntegerField(default=1, help_text='Read Pattern Number'), + ), + ] From af408289b4334e6287556238b0a001aad3307bd1 Mon Sep 17 00:00:00 2001 From: Mees Fix Date: Thu, 11 Apr 2024 13:33:24 -0700 Subject: [PATCH 22/33] Updating changelog for release 1.2.6 --- CHANGES.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 01be6e18f..d62e0110e 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,5 +1,19 @@ ## What's Changed +1.2.6 (2024-04-15) +================== + +Web Application +~~~~~~~~~~~~~~~ +- Update NIRCam Background Monitor plots to handle new Claw Monitor columns by @bsunnquist + +Project & API Documentation +~~~~~~~~~~~~~~~~~~~~~~~~~~~ +- add default to read_patt_num by @BradleySappington +- migration work for next RC by @BradleySappington +- Fix database empty fields by @BradleySappington + + 1.2.5 (2024-03-19) ================== From 90de1c114a0752f4c4521d9ac50a3fc589f63b19 Mon Sep 17 00:00:00 2001 From: Bradley Sappington <101193271+BradleySappington@users.noreply.github.com> Date: Fri, 12 Apr 2024 14:07:54 -0400 Subject: [PATCH 23/33] Update CHANGES.rst for 1.2.6 --- CHANGES.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 01be6e18f..d2af5e5a2 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,4 +1,17 @@ ## What's Changed +1.2.6 (2024-04-15) +================== + +Web Application +~~~~~~~~~~~~~~~ +- Fixed background prediction call for narrow and medium bands to use correct pivot wavelength by @bsunnquist +- Update database default values by @bsappington + +Project & API Documentation +~~~~~~~~~~~~~~~~~~~~~~~~~~~ +- Handle empty values in archive_database_update by @bsappington +- Resolve timezone warnings by @bsunnquist + 1.2.5 (2024-03-19) ================== From 2dd903a635818f3f3062b848f4e047dac9396e31 Mon Sep 17 00:00:00 2001 From: Bradley Sappington <101193271+BradleySappington@users.noreply.github.com> Date: Fri, 12 Apr 2024 14:09:03 -0400 Subject: [PATCH 24/33] Update CHANGES.rst format --- CHANGES.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.rst b/CHANGES.rst index d2af5e5a2..a9d8763e5 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,4 +1,5 @@ ## What's Changed + 1.2.6 (2024-04-15) ================== From 8ae49af7f2f69f964e4c33d5105ef41a0f3e727e Mon Sep 17 00:00:00 2001 From: Bradley Sappington <101193271+BradleySappington@users.noreply.github.com> Date: Fri, 12 Apr 2024 14:09:57 -0400 Subject: [PATCH 25/33] name fix --- CHANGES.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index a9d8763e5..b3113b6c7 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -6,11 +6,11 @@ Web Application ~~~~~~~~~~~~~~~ - Fixed background prediction call for narrow and medium bands to use correct pivot wavelength by @bsunnquist -- Update database default values by @bsappington +- Update database default values by @BradleySappington Project & API Documentation ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- Handle empty values in archive_database_update by @bsappington +- Handle empty values in archive_database_update by @BradleySappington - Resolve timezone warnings by @bsunnquist From 4856e87a88af7154cc6d77ebbc85087de826e259 Mon Sep 17 00:00:00 2001 From: Bradley Sappington <101193271+BradleySappington@users.noreply.github.com> Date: Fri, 12 Apr 2024 14:12:02 -0400 Subject: [PATCH 26/33] remove 1.2.6 --- CHANGES.rst | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index b3113b6c7..01be6e18f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,19 +1,5 @@ ## What's Changed -1.2.6 (2024-04-15) -================== - -Web Application -~~~~~~~~~~~~~~~ -- Fixed background prediction call for narrow and medium bands to use correct pivot wavelength by @bsunnquist -- Update database default values by @BradleySappington - -Project & API Documentation -~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- Handle empty values in archive_database_update by @BradleySappington -- Resolve timezone warnings by @bsunnquist - - 1.2.5 (2024-03-19) ================== From 43402bdceeaa518866eea153eb4573ae668b8cfa Mon Sep 17 00:00:00 2001 From: Bradley Sappington <101193271+BradleySappington@users.noreply.github.com> Date: Fri, 12 Apr 2024 14:13:06 -0400 Subject: [PATCH 27/33] Revert "Update Changelog for Version 1.2.6" --- CHANGES.rst | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index d62e0110e..01be6e18f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,19 +1,5 @@ ## What's Changed -1.2.6 (2024-04-15) -================== - -Web Application -~~~~~~~~~~~~~~~ -- Update NIRCam Background Monitor plots to handle new Claw Monitor columns by @bsunnquist - -Project & API Documentation -~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- add default to read_patt_num by @BradleySappington -- migration work for next RC by @BradleySappington -- Fix database empty fields by @BradleySappington - - 1.2.5 (2024-03-19) ================== From d3976193498b33a456e20787b2b9348b0081046a Mon Sep 17 00:00:00 2001 From: Mees Fix Date: Fri, 12 Apr 2024 11:39:03 -0700 Subject: [PATCH 28/33] Adding change log for next release --- CHANGES.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 01be6e18f..d62e0110e 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,5 +1,19 @@ ## What's Changed +1.2.6 (2024-04-15) +================== + +Web Application +~~~~~~~~~~~~~~~ +- Update NIRCam Background Monitor plots to handle new Claw Monitor columns by @bsunnquist + +Project & API Documentation +~~~~~~~~~~~~~~~~~~~~~~~~~~~ +- add default to read_patt_num by @BradleySappington +- migration work for next RC by @BradleySappington +- Fix database empty fields by @BradleySappington + + 1.2.5 (2024-03-19) ================== From 92cf50339e21d2c47720d5e8d0dfc021cc0957bb Mon Sep 17 00:00:00 2001 From: Bradley Sappington <101193271+BradleySappington@users.noreply.github.com> Date: Mon, 15 Apr 2024 13:31:51 -0400 Subject: [PATCH 29/33] merge changelog (#1540) * Update CHANGES.rst for 1.2.6 * Update CHANGES.rst format * name fix * remove 1.2.6 * Adding change log for next release --------- Co-authored-by: Mees Fix --- CHANGES.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 01be6e18f..d62e0110e 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,5 +1,19 @@ ## What's Changed +1.2.6 (2024-04-15) +================== + +Web Application +~~~~~~~~~~~~~~~ +- Update NIRCam Background Monitor plots to handle new Claw Monitor columns by @bsunnquist + +Project & API Documentation +~~~~~~~~~~~~~~~~~~~~~~~~~~~ +- add default to read_patt_num by @BradleySappington +- migration work for next RC by @BradleySappington +- Fix database empty fields by @BradleySappington + + 1.2.5 (2024-03-19) ================== From 4771bf703c9ef8620ed280ffd79a1ee9d72d771e Mon Sep 17 00:00:00 2001 From: Bryan Hilbert Date: Wed, 17 Apr 2024 15:20:47 -0400 Subject: [PATCH 30/33] Import monitor models in model_pages __init__.py (#1542) * import in __init__.py * Add migration 0022 with EDB monitor model definitions --- ...ts_nirspecedbtimeintervalstats_and_more.py | 1099 +++++++++++++++++ .../apps/jwql/monitor_pages/__init__.py | 33 + 2 files changed, 1132 insertions(+) create mode 100644 jwql/website/apps/jwql/migrations/0022_nirspecedbtimestats_nirspecedbtimeintervalstats_and_more.py diff --git a/jwql/website/apps/jwql/migrations/0022_nirspecedbtimestats_nirspecedbtimeintervalstats_and_more.py b/jwql/website/apps/jwql/migrations/0022_nirspecedbtimestats_nirspecedbtimeintervalstats_and_more.py new file mode 100644 index 000000000..19b4dd955 --- /dev/null +++ b/jwql/website/apps/jwql/migrations/0022_nirspecedbtimestats_nirspecedbtimeintervalstats_and_more.py @@ -0,0 +1,1099 @@ +# Generated by Django 4.2.5 on 2024-04-17 17:44 + +import django.contrib.postgres.fields +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('jwql', '0021_alter_rootfileinfo_read_patt_num'), + ] + + operations = [ + migrations.CreateModel( + name='NIRSpecEdbTimeStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('mnemonic', models.CharField(blank=True, max_length=40, null=True)), + ('latest_query', models.DateTimeField(blank=True, null=True)), + ('times', django.contrib.postgres.fields.ArrayField(base_field=models.DateTimeField(), size=None)), + ('data', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('stdev', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('entry_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'nirspec_edb_time_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRSpecEdbTimeIntervalStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('mnemonic', models.CharField(blank=True, max_length=40, null=True)), + ('latest_query', models.DateTimeField(blank=True, null=True)), + ('times', django.contrib.postgres.fields.ArrayField(base_field=models.DateTimeField(), size=None)), + ('data', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('stdev', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('median', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('max', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('min', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('entry_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'nirspec_edb_time_interval_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRSpecEdbEveryChangeStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('mnemonic', models.CharField(blank=True, max_length=40, null=True)), + ('latest_query', models.DateTimeField(blank=True, null=True)), + ('time', django.contrib.postgres.fields.ArrayField(base_field=models.DateTimeField(), size=None)), + ('mnemonic_value', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('median', models.FloatField(blank=True, null=True)), + ('stdev', models.FloatField(blank=True, null=True)), + ('dependency_mnemonic', models.CharField(blank=True, max_length=40, null=True)), + ('dependency_value', models.CharField(blank=True, max_length=40, null=True)), + ('entry_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'nirspec_edb_every_change_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRSpecEdbDailyStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('mnemonic', models.CharField(blank=True, max_length=40, null=True)), + ('latest_query', models.DateTimeField(blank=True, null=True)), + ('times', django.contrib.postgres.fields.ArrayField(base_field=models.DateTimeField(), size=None)), + ('data', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('stdev', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('median', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('max', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('min', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('entry_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'nirspec_edb_daily_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRSpecEdbBlocksStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('mnemonic', models.CharField(blank=True, max_length=40, null=True)), + ('latest_query', models.DateTimeField(blank=True, null=True)), + ('times', django.contrib.postgres.fields.ArrayField(base_field=models.DateTimeField(), size=None)), + ('data', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('stdev', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('median', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('max', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('min', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('entry_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'nirspec_edb_blocks_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRSpecDarkQueryHistory', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('instrument', models.CharField(blank=True, max_length=7, null=True)), + ('aperture', models.CharField(blank=True, max_length=40, null=True)), + ('readpattern', models.CharField(blank=True, max_length=40, null=True)), + ('start_time_mjd', models.FloatField(blank=True, null=True)), + ('end_time_mjd', models.FloatField(blank=True, null=True)), + ('files_found', models.IntegerField(blank=True, null=True)), + ('run_monitor', models.BooleanField(blank=True, null=True)), + ], + options={ + 'db_table': 'nirspec_dark_query_history', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRSpecDarkPixelStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('detector', models.CharField(blank=True, max_length=40, null=True)), + ('x_coord', django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(), size=None)), + ('y_coord', django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(), size=None)), + ('type', models.CharField(blank=True, max_length=40, null=True)), + ('source_files', models.TextField(blank=True, null=True)), + ('obs_start_time', models.DateTimeField(blank=True, null=True)), + ('obs_mid_time', models.DateTimeField(blank=True, null=True)), + ('obs_end_time', models.DateTimeField(blank=True, null=True)), + ('mean_dark_image_file', models.CharField(max_length=1000, null=True)), + ('baseline_file', models.CharField(max_length=1000, null=True)), + ], + options={ + 'db_table': 'nirspec_dark_pixel_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRSpecDarkDarkCurrent', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('aperture', models.CharField(blank=True, max_length=40, null=True)), + ('amplifier', models.CharField(blank=True, max_length=40, null=True)), + ('readpattern', models.CharField(blank=True, max_length=40, null=True)), + ('mean', models.FloatField(blank=True, null=True)), + ('stdev', models.FloatField(blank=True, null=True)), + ('source_files', models.TextField(blank=True, null=True)), + ('obs_start_time', models.DateTimeField(blank=True, null=True)), + ('obs_mid_time', models.DateTimeField(blank=True, null=True)), + ('obs_end_time', models.DateTimeField(blank=True, null=True)), + ('gauss_amplitude', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('gauss_peak', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('gauss_width', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('gauss_chisq', models.FloatField(blank=True, null=True)), + ('double_gauss_amplitude1', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('double_gauss_peak1', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('double_gauss_width1', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('double_gauss_amplitude2', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('double_gauss_peak2', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('double_gauss_width2', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('double_gauss_chisq', models.FloatField(blank=True, null=True)), + ('mean_dark_image_file', models.CharField(max_length=1000, null=True)), + ('hist_dark_values', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('hist_amplitudes', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ], + options={ + 'db_table': 'nirspec_dark_dark_current', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRSpecBadPixelStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('detector', models.CharField(blank=True, max_length=40, null=True)), + ('x_coord', django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(), size=None)), + ('y_coord', django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(), size=None)), + ('type', models.CharField(blank=True, max_length=40, null=True)), + ('source_files', models.TextField(blank=True, null=True)), + ('obs_start_time', models.DateTimeField(blank=True, null=True)), + ('obs_mid_time', models.DateTimeField(blank=True, null=True)), + ('obs_end_time', models.DateTimeField(blank=True, null=True)), + ('baseline_file', models.CharField(max_length=1000, null=True)), + ], + options={ + 'db_table': 'nirspec_bad_pixel_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRSpecBadPixelQueryHistory', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('instrument', models.CharField(blank=True, max_length=7, null=True)), + ('aperture', models.CharField(blank=True, max_length=40, null=True)), + ('dark_start_time_mjd', models.FloatField(blank=True, null=True)), + ('dark_end_time_mjd', models.FloatField(blank=True, null=True)), + ('flat_start_time_mjd', models.FloatField(blank=True, null=True)), + ('flat_end_time_mjd', models.FloatField(blank=True, null=True)), + ('dark_files_found', models.IntegerField(blank=True, null=True)), + ('flat_files_found', models.IntegerField(blank=True, null=True)), + ('run_bpix_from_darks', models.BooleanField(blank=True, null=True)), + ('run_bpix_from_flats', models.BooleanField(blank=True, null=True)), + ('run_monitor', models.BooleanField(blank=True, null=True)), + ], + options={ + 'db_table': 'nirspec_bad_pixel_query_history', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRISSEdbTimeStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('mnemonic', models.CharField(blank=True, max_length=40, null=True)), + ('latest_query', models.DateTimeField(blank=True, null=True)), + ('times', django.contrib.postgres.fields.ArrayField(base_field=models.DateTimeField(), size=None)), + ('data', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('stdev', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('entry_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'niriss_edb_time_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRISSEdbTimeIntervalStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('mnemonic', models.CharField(blank=True, max_length=40, null=True)), + ('latest_query', models.DateTimeField(blank=True, null=True)), + ('times', django.contrib.postgres.fields.ArrayField(base_field=models.DateTimeField(), size=None)), + ('data', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('stdev', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('median', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('max', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('min', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('entry_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'niriss_edb_time_interval_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRISSEdbEveryChangeStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('mnemonic', models.CharField(blank=True, max_length=40, null=True)), + ('latest_query', models.DateTimeField(blank=True, null=True)), + ('time', django.contrib.postgres.fields.ArrayField(base_field=models.DateTimeField(), size=None)), + ('mnemonic_value', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('median', models.FloatField(blank=True, null=True)), + ('stdev', models.FloatField(blank=True, null=True)), + ('dependency_mnemonic', models.CharField(blank=True, max_length=40, null=True)), + ('dependency_value', models.CharField(blank=True, max_length=40, null=True)), + ('entry_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'niriss_edb_every_change_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRISSEdbDailyStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('mnemonic', models.CharField(blank=True, max_length=40, null=True)), + ('latest_query', models.DateTimeField(blank=True, null=True)), + ('times', django.contrib.postgres.fields.ArrayField(base_field=models.DateTimeField(), size=None)), + ('data', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('stdev', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('median', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('max', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('min', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('entry_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'niriss_edb_daily_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRISSEdbBlocksStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('mnemonic', models.CharField(blank=True, max_length=40, null=True)), + ('latest_query', models.DateTimeField(blank=True, null=True)), + ('times', django.contrib.postgres.fields.ArrayField(base_field=models.DateTimeField(), size=None)), + ('data', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('stdev', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('median', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('max', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('min', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('entry_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'niriss_edb_blocks_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRISSDarkQueryHistory', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('instrument', models.CharField(blank=True, max_length=7, null=True)), + ('aperture', models.CharField(blank=True, max_length=40, null=True)), + ('readpattern', models.CharField(blank=True, max_length=40, null=True)), + ('start_time_mjd', models.FloatField(blank=True, null=True)), + ('end_time_mjd', models.FloatField(blank=True, null=True)), + ('files_found', models.IntegerField(blank=True, null=True)), + ('run_monitor', models.BooleanField(blank=True, null=True)), + ], + options={ + 'db_table': 'niriss_dark_query_history', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRISSDarkPixelStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('detector', models.CharField(blank=True, max_length=40, null=True)), + ('x_coord', django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(), size=None)), + ('y_coord', django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(), size=None)), + ('type', models.CharField(blank=True, max_length=40, null=True)), + ('source_files', models.TextField(blank=True, null=True)), + ('obs_start_time', models.DateTimeField(blank=True, null=True)), + ('obs_mid_time', models.DateTimeField(blank=True, null=True)), + ('obs_end_time', models.DateTimeField(blank=True, null=True)), + ('mean_dark_image_file', models.CharField(max_length=1000, null=True)), + ('baseline_file', models.CharField(max_length=1000, null=True)), + ], + options={ + 'db_table': 'niriss_dark_pixel_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRISSDarkDarkCurrent', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('aperture', models.CharField(blank=True, max_length=40, null=True)), + ('amplifier', models.CharField(blank=True, max_length=40, null=True)), + ('readpattern', models.CharField(blank=True, max_length=40, null=True)), + ('mean', models.FloatField(blank=True, null=True)), + ('stdev', models.FloatField(blank=True, null=True)), + ('source_files', models.TextField(blank=True, null=True)), + ('obs_start_time', models.DateTimeField(blank=True, null=True)), + ('obs_mid_time', models.DateTimeField(blank=True, null=True)), + ('obs_end_time', models.DateTimeField(blank=True, null=True)), + ('gauss_amplitude', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('gauss_peak', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('gauss_width', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('gauss_chisq', models.FloatField(blank=True, null=True)), + ('double_gauss_amplitude1', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('double_gauss_peak1', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('double_gauss_width1', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('double_gauss_amplitude2', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('double_gauss_peak2', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('double_gauss_width2', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('double_gauss_chisq', models.FloatField(blank=True, null=True)), + ('mean_dark_image_file', models.CharField(max_length=1000, null=True)), + ('hist_dark_values', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('hist_amplitudes', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ], + options={ + 'db_table': 'niriss_dark_dark_current', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRISSBadPixelStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('detector', models.CharField(blank=True, max_length=40, null=True)), + ('x_coord', django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(), size=None)), + ('y_coord', django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(), size=None)), + ('type', models.CharField(blank=True, max_length=40, null=True)), + ('source_files', models.TextField(blank=True, null=True)), + ('obs_start_time', models.DateTimeField(blank=True, null=True)), + ('obs_mid_time', models.DateTimeField(blank=True, null=True)), + ('obs_end_time', models.DateTimeField(blank=True, null=True)), + ('baseline_file', models.CharField(max_length=1000, null=True)), + ], + options={ + 'db_table': 'niriss_bad_pixel_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRISSBadPixelQueryHistory', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('instrument', models.CharField(blank=True, max_length=7, null=True)), + ('aperture', models.CharField(blank=True, max_length=40, null=True)), + ('dark_start_time_mjd', models.FloatField(blank=True, null=True)), + ('dark_end_time_mjd', models.FloatField(blank=True, null=True)), + ('flat_start_time_mjd', models.FloatField(blank=True, null=True)), + ('flat_end_time_mjd', models.FloatField(blank=True, null=True)), + ('dark_files_found', models.IntegerField(blank=True, null=True)), + ('flat_files_found', models.IntegerField(blank=True, null=True)), + ('run_bpix_from_darks', models.BooleanField(blank=True, null=True)), + ('run_bpix_from_flats', models.BooleanField(blank=True, null=True)), + ('run_monitor', models.BooleanField(blank=True, null=True)), + ], + options={ + 'db_table': 'niriss_bad_pixel_query_history', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRCamEdbTimeStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('mnemonic', models.CharField(blank=True, max_length=40, null=True)), + ('latest_query', models.DateTimeField(blank=True, null=True)), + ('times', django.contrib.postgres.fields.ArrayField(base_field=models.DateTimeField(), size=None)), + ('data', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('stdev', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('entry_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'nircam_edb_time_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRCamEdbTimeIntervalStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('mnemonic', models.CharField(blank=True, max_length=40, null=True)), + ('latest_query', models.DateTimeField(blank=True, null=True)), + ('times', django.contrib.postgres.fields.ArrayField(base_field=models.DateTimeField(), size=None)), + ('data', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('stdev', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('median', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('max', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('min', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('entry_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'nircam_edb_time_interval_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRCamEdbEveryChangeStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('mnemonic', models.CharField(blank=True, max_length=40, null=True)), + ('latest_query', models.DateTimeField(blank=True, null=True)), + ('time', django.contrib.postgres.fields.ArrayField(base_field=models.DateTimeField(), size=None)), + ('mnemonic_value', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('median', models.FloatField(blank=True, null=True)), + ('stdev', models.FloatField(blank=True, null=True)), + ('dependency_mnemonic', models.CharField(blank=True, max_length=40, null=True)), + ('dependency_value', models.CharField(blank=True, max_length=40, null=True)), + ('entry_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'nircam_edb_every_change_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRCamEdbDailyStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('mnemonic', models.CharField(blank=True, max_length=40, null=True)), + ('latest_query', models.DateTimeField(blank=True, null=True)), + ('times', django.contrib.postgres.fields.ArrayField(base_field=models.DateTimeField(), size=None)), + ('data', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('stdev', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('median', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('max', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('min', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('entry_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'nircam_edb_daily_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRCamEdbBlocksStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('mnemonic', models.CharField(blank=True, max_length=40, null=True)), + ('latest_query', models.DateTimeField(blank=True, null=True)), + ('times', django.contrib.postgres.fields.ArrayField(base_field=models.DateTimeField(), size=None)), + ('data', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('stdev', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('median', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('max', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('min', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('entry_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'nircam_edb_blocks_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRCamDarkQueryHistory', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('instrument', models.CharField(blank=True, max_length=7, null=True)), + ('aperture', models.CharField(blank=True, max_length=40, null=True)), + ('readpattern', models.CharField(blank=True, max_length=40, null=True)), + ('start_time_mjd', models.FloatField(blank=True, null=True)), + ('end_time_mjd', models.FloatField(blank=True, null=True)), + ('files_found', models.IntegerField(blank=True, null=True)), + ('run_monitor', models.BooleanField(blank=True, null=True)), + ], + options={ + 'db_table': 'nircam_dark_query_history', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRCamDarkPixelStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('detector', models.CharField(blank=True, max_length=40, null=True)), + ('x_coord', django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(), size=None)), + ('y_coord', django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(), size=None)), + ('type', models.CharField(blank=True, max_length=40, null=True)), + ('source_files', models.TextField(blank=True, null=True)), + ('obs_start_time', models.DateTimeField(blank=True, null=True)), + ('obs_mid_time', models.DateTimeField(blank=True, null=True)), + ('obs_end_time', models.DateTimeField(blank=True, null=True)), + ('mean_dark_image_file', models.CharField(max_length=1000, null=True)), + ('baseline_file', models.CharField(max_length=1000, null=True)), + ], + options={ + 'db_table': 'nircam_dark_pixel_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRCamDarkDarkCurrent', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('aperture', models.CharField(blank=True, max_length=40, null=True)), + ('amplifier', models.CharField(blank=True, max_length=40, null=True)), + ('readpattern', models.CharField(blank=True, max_length=40, null=True)), + ('mean', models.FloatField(blank=True, null=True)), + ('stdev', models.FloatField(blank=True, null=True)), + ('source_files', models.TextField(blank=True, null=True)), + ('obs_start_time', models.DateTimeField(blank=True, null=True)), + ('obs_mid_time', models.DateTimeField(blank=True, null=True)), + ('obs_end_time', models.DateTimeField(blank=True, null=True)), + ('gauss_amplitude', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('gauss_peak', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('gauss_width', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('gauss_chisq', models.FloatField(blank=True, null=True)), + ('double_gauss_amplitude1', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('double_gauss_peak1', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('double_gauss_width1', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('double_gauss_amplitude2', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('double_gauss_peak2', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('double_gauss_width2', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('double_gauss_chisq', models.FloatField(blank=True, null=True)), + ('mean_dark_image_file', models.CharField(max_length=1000, null=True)), + ('hist_dark_values', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('hist_amplitudes', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ], + options={ + 'db_table': 'nircam_dark_dark_current', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRCamBadPixelStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('detector', models.CharField(blank=True, max_length=40, null=True)), + ('x_coord', django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(), size=None)), + ('y_coord', django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(), size=None)), + ('type', models.CharField(blank=True, max_length=40, null=True)), + ('source_files', models.TextField(blank=True, null=True)), + ('obs_start_time', models.DateTimeField(blank=True, null=True)), + ('obs_mid_time', models.DateTimeField(blank=True, null=True)), + ('obs_end_time', models.DateTimeField(blank=True, null=True)), + ('baseline_file', models.CharField(max_length=1000, null=True)), + ], + options={ + 'db_table': 'nircam_bad_pixel_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRCamBadPixelQueryHistory', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('instrument', models.CharField(blank=True, max_length=7, null=True)), + ('aperture', models.CharField(blank=True, max_length=40, null=True)), + ('dark_start_time_mjd', models.FloatField(blank=True, null=True)), + ('dark_end_time_mjd', models.FloatField(blank=True, null=True)), + ('flat_start_time_mjd', models.FloatField(blank=True, null=True)), + ('flat_end_time_mjd', models.FloatField(blank=True, null=True)), + ('dark_files_found', models.IntegerField(blank=True, null=True)), + ('flat_files_found', models.IntegerField(blank=True, null=True)), + ('run_bpix_from_darks', models.BooleanField(blank=True, null=True)), + ('run_bpix_from_flats', models.BooleanField(blank=True, null=True)), + ('run_monitor', models.BooleanField(blank=True, null=True)), + ], + options={ + 'db_table': 'nircam_bad_pixel_query_history', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='MIRIEdbTimeStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('mnemonic', models.CharField(blank=True, max_length=40, null=True)), + ('latest_query', models.DateTimeField(blank=True, null=True)), + ('times', django.contrib.postgres.fields.ArrayField(base_field=models.DateTimeField(), size=None)), + ('data', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('stdev', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('entry_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'miri_edb_time_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='MIRIEdbTimeIntervalStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('mnemonic', models.CharField(blank=True, max_length=40, null=True)), + ('latest_query', models.DateTimeField(blank=True, null=True)), + ('times', django.contrib.postgres.fields.ArrayField(base_field=models.DateTimeField(), size=None)), + ('data', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('stdev', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('median', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('max', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('min', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('entry_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'miri_edb_time_interval_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='MIRIEdbEveryChangeStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('mnemonic', models.CharField(blank=True, max_length=40, null=True)), + ('latest_query', models.DateTimeField(blank=True, null=True)), + ('time', django.contrib.postgres.fields.ArrayField(base_field=models.DateTimeField(), size=None)), + ('mnemonic_value', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('median', models.FloatField(blank=True, null=True)), + ('stdev', models.FloatField(blank=True, null=True)), + ('dependency_mnemonic', models.CharField(blank=True, max_length=40, null=True)), + ('dependency_value', models.CharField(blank=True, max_length=40, null=True)), + ('entry_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'miri_edb_every_change_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='MIRIEdbDailyStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('mnemonic', models.CharField(blank=True, max_length=40, null=True)), + ('latest_query', models.DateTimeField(blank=True, null=True)), + ('times', django.contrib.postgres.fields.ArrayField(base_field=models.DateTimeField(), size=None)), + ('data', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('stdev', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('median', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('max', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('min', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('entry_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'miri_edb_daily_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='MIRIEdbBlocksStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('mnemonic', models.CharField(blank=True, max_length=40, null=True)), + ('latest_query', models.DateTimeField(blank=True, null=True)), + ('times', django.contrib.postgres.fields.ArrayField(base_field=models.DateTimeField(), size=None)), + ('data', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('stdev', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('median', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('max', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('min', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('entry_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'miri_edb_blocks_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='MIRIDarkQueryHistory', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('instrument', models.CharField(blank=True, max_length=7, null=True)), + ('aperture', models.CharField(blank=True, max_length=40, null=True)), + ('readpattern', models.CharField(blank=True, max_length=40, null=True)), + ('start_time_mjd', models.FloatField(blank=True, null=True)), + ('end_time_mjd', models.FloatField(blank=True, null=True)), + ('files_found', models.IntegerField(blank=True, null=True)), + ('run_monitor', models.BooleanField(blank=True, null=True)), + ], + options={ + 'db_table': 'miri_dark_query_history', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='MIRIDarkPixelStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('detector', models.CharField(blank=True, max_length=40, null=True)), + ('x_coord', django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(), size=None)), + ('y_coord', django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(), size=None)), + ('type', models.CharField(blank=True, max_length=40, null=True)), + ('source_files', models.TextField(blank=True, null=True)), + ('obs_start_time', models.DateTimeField(blank=True, null=True)), + ('obs_mid_time', models.DateTimeField(blank=True, null=True)), + ('obs_end_time', models.DateTimeField(blank=True, null=True)), + ('mean_dark_image_file', models.CharField(max_length=1000, null=True)), + ('baseline_file', models.CharField(max_length=1000, null=True)), + ], + options={ + 'db_table': 'miri_dark_pixel_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='MIRIDarkDarkCurrent', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('aperture', models.CharField(blank=True, max_length=40, null=True)), + ('amplifier', models.CharField(blank=True, max_length=40, null=True)), + ('readpattern', models.CharField(blank=True, max_length=40, null=True)), + ('mean', models.FloatField(blank=True, null=True)), + ('stdev', models.FloatField(blank=True, null=True)), + ('source_files', models.TextField(blank=True, null=True)), + ('obs_start_time', models.DateTimeField(blank=True, null=True)), + ('obs_mid_time', models.DateTimeField(blank=True, null=True)), + ('obs_end_time', models.DateTimeField(blank=True, null=True)), + ('gauss_amplitude', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('gauss_peak', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('gauss_width', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('gauss_chisq', models.FloatField(blank=True, null=True)), + ('double_gauss_amplitude1', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('double_gauss_peak1', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('double_gauss_width1', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('double_gauss_amplitude2', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('double_gauss_peak2', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('double_gauss_width2', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('double_gauss_chisq', models.FloatField(blank=True, null=True)), + ('mean_dark_image_file', models.CharField(max_length=1000, null=True)), + ('hist_dark_values', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('hist_amplitudes', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ], + options={ + 'db_table': 'miri_dark_dark_current', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='MIRIBadPixelStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('detector', models.CharField(blank=True, max_length=40, null=True)), + ('x_coord', django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(), size=None)), + ('y_coord', django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(), size=None)), + ('type', models.CharField(blank=True, max_length=40, null=True)), + ('source_files', models.TextField(blank=True, null=True)), + ('obs_start_time', models.DateTimeField(blank=True, null=True)), + ('obs_mid_time', models.DateTimeField(blank=True, null=True)), + ('obs_end_time', models.DateTimeField(blank=True, null=True)), + ('baseline_file', models.CharField(max_length=1000, null=True)), + ], + options={ + 'db_table': 'miri_bad_pixel_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='MIRIBadPixelQueryHistory', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('instrument', models.CharField(blank=True, max_length=7, null=True)), + ('aperture', models.CharField(blank=True, max_length=40, null=True)), + ('dark_start_time_mjd', models.FloatField(blank=True, null=True)), + ('dark_end_time_mjd', models.FloatField(blank=True, null=True)), + ('flat_start_time_mjd', models.FloatField(blank=True, null=True)), + ('flat_end_time_mjd', models.FloatField(blank=True, null=True)), + ('dark_files_found', models.IntegerField(blank=True, null=True)), + ('flat_files_found', models.IntegerField(blank=True, null=True)), + ('run_bpix_from_darks', models.BooleanField(blank=True, null=True)), + ('run_bpix_from_flats', models.BooleanField(blank=True, null=True)), + ('run_monitor', models.BooleanField(blank=True, null=True)), + ], + options={ + 'db_table': 'miri_bad_pixel_query_history', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='FGSEdbTimeStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('mnemonic', models.CharField(blank=True, max_length=40, null=True)), + ('latest_query', models.DateTimeField(blank=True, null=True)), + ('times', django.contrib.postgres.fields.ArrayField(base_field=models.DateTimeField(), size=None)), + ('data', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('stdev', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('entry_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'fgs_edb_time_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='FGSEdbTimeIntervalStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('mnemonic', models.CharField(blank=True, max_length=40, null=True)), + ('latest_query', models.DateTimeField(blank=True, null=True)), + ('times', django.contrib.postgres.fields.ArrayField(base_field=models.DateTimeField(), size=None)), + ('data', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('stdev', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('median', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('max', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('min', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('entry_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'fgs_edb_time_interval_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='FGSEdbEveryChangeStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('mnemonic', models.CharField(blank=True, max_length=40, null=True)), + ('latest_query', models.DateTimeField(blank=True, null=True)), + ('time', django.contrib.postgres.fields.ArrayField(base_field=models.DateTimeField(), size=None)), + ('mnemonic_value', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('median', models.FloatField(blank=True, null=True)), + ('stdev', models.FloatField(blank=True, null=True)), + ('dependency_mnemonic', models.CharField(blank=True, max_length=40, null=True)), + ('dependency_value', models.CharField(blank=True, max_length=40, null=True)), + ('entry_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'fgs_edb_every_change_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='FGSEdbDailyStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('mnemonic', models.CharField(blank=True, max_length=40, null=True)), + ('latest_query', models.DateTimeField(blank=True, null=True)), + ('times', django.contrib.postgres.fields.ArrayField(base_field=models.DateTimeField(), size=None)), + ('data', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('stdev', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('median', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('max', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('min', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('entry_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'fgs_edb_daily_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='FGSEdbBlocksStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('mnemonic', models.CharField(blank=True, max_length=40, null=True)), + ('latest_query', models.DateTimeField(blank=True, null=True)), + ('times', django.contrib.postgres.fields.ArrayField(base_field=models.DateTimeField(), size=None)), + ('data', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('stdev', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('median', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('max', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('min', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('entry_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'fgs_edb_blocks_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='FGSDarkQueryHistory', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('instrument', models.CharField(blank=True, max_length=7, null=True)), + ('aperture', models.CharField(blank=True, max_length=40, null=True)), + ('readpattern', models.CharField(blank=True, max_length=40, null=True)), + ('start_time_mjd', models.FloatField(blank=True, null=True)), + ('end_time_mjd', models.FloatField(blank=True, null=True)), + ('files_found', models.IntegerField(blank=True, null=True)), + ('run_monitor', models.BooleanField(blank=True, null=True)), + ], + options={ + 'db_table': 'fgs_dark_query_history', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='FGSDarkPixelStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('detector', models.CharField(blank=True, max_length=40, null=True)), + ('x_coord', django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(), size=None)), + ('y_coord', django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(), size=None)), + ('type', models.CharField(blank=True, max_length=40, null=True)), + ('source_files', models.TextField(blank=True, null=True)), + ('obs_start_time', models.DateTimeField(blank=True, null=True)), + ('obs_mid_time', models.DateTimeField(blank=True, null=True)), + ('obs_end_time', models.DateTimeField(blank=True, null=True)), + ('mean_dark_image_file', models.CharField(max_length=1000, null=True)), + ('baseline_file', models.CharField(max_length=1000, null=True)), + ], + options={ + 'db_table': 'fgs_dark_pixel_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='FGSDarkDarkCurrent', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('aperture', models.CharField(blank=True, max_length=40, null=True)), + ('amplifier', models.CharField(blank=True, max_length=40, null=True)), + ('readpattern', models.CharField(blank=True, max_length=40, null=True)), + ('mean', models.FloatField(blank=True, null=True)), + ('stdev', models.FloatField(blank=True, null=True)), + ('source_files', models.TextField(blank=True, null=True)), + ('obs_start_time', models.DateTimeField(blank=True, null=True)), + ('obs_mid_time', models.DateTimeField(blank=True, null=True)), + ('obs_end_time', models.DateTimeField(blank=True, null=True)), + ('gauss_amplitude', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('gauss_peak', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('gauss_width', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('gauss_chisq', models.FloatField(blank=True, null=True)), + ('double_gauss_amplitude1', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('double_gauss_peak1', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('double_gauss_width1', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('double_gauss_amplitude2', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('double_gauss_peak2', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('double_gauss_width2', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('double_gauss_chisq', models.FloatField(blank=True, null=True)), + ('mean_dark_image_file', models.CharField(max_length=1000, null=True)), + ('hist_dark_values', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('hist_amplitudes', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ], + options={ + 'db_table': 'fgs_dark_dark_current', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='FGSBadPixelStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('detector', models.CharField(blank=True, max_length=40, null=True)), + ('x_coord', django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(), size=None)), + ('y_coord', django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(), size=None)), + ('type', models.CharField(blank=True, max_length=40, null=True)), + ('source_files', models.TextField(blank=True, null=True)), + ('obs_start_time', models.DateTimeField(blank=True, null=True)), + ('obs_mid_time', models.DateTimeField(blank=True, null=True)), + ('obs_end_time', models.DateTimeField(blank=True, null=True)), + ('baseline_file', models.CharField(blank=True, max_length=1000, null=True)), + ], + options={ + 'db_table': 'fgs_bad_pixel_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='FGSBadPixelQueryHistory', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('instrument', models.CharField(blank=True, max_length=7, null=True)), + ('aperture', models.CharField(blank=True, max_length=40, null=True)), + ('dark_start_time_mjd', models.FloatField(blank=True, null=True)), + ('dark_end_time_mjd', models.FloatField(blank=True, null=True)), + ('flat_start_time_mjd', models.FloatField(blank=True, null=True)), + ('flat_end_time_mjd', models.FloatField(blank=True, null=True)), + ('dark_files_found', models.IntegerField(blank=True, null=True)), + ('flat_files_found', models.IntegerField(blank=True, null=True)), + ('run_bpix_from_darks', models.BooleanField(blank=True, null=True)), + ('run_bpix_from_flats', models.BooleanField(blank=True, null=True)), + ('run_monitor', models.BooleanField(blank=True, null=True)), + ], + options={ + 'db_table': 'fgs_bad_pixel_query_history', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + ] diff --git a/jwql/website/apps/jwql/monitor_pages/__init__.py b/jwql/website/apps/jwql/monitor_pages/__init__.py index ed184d7ff..0ba32e541 100644 --- a/jwql/website/apps/jwql/monitor_pages/__init__.py +++ b/jwql/website/apps/jwql/monitor_pages/__init__.py @@ -1 +1,34 @@ +import os + from .monitor_cosmic_rays_bokeh import CosmicRayMonitor + +from jwql.utils.constants import ON_GITHUB_ACTIONS, ON_READTHEDOCS + +if not ON_GITHUB_ACTIONS and not ON_READTHEDOCS: + # Need to set up django apps before we can access the models + import django # noqa: E402 (module level import not at top of file) + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "jwql.website.jwql_proj.settings") + django.setup() + from jwql.website.apps.jwql.monitor_models.bad_pixel import FGSBadPixelQueryHistory, FGSBadPixelStats, MIRIBadPixelQueryHistory, MIRIBadPixelStats + from jwql.website.apps.jwql.monitor_models.bad_pixel import NIRCamBadPixelQueryHistory, NIRCamBadPixelStats, NIRISSBadPixelQueryHistory, NIRISSBadPixelStats + from jwql.website.apps.jwql.monitor_models.bad_pixel import NIRSpecBadPixelQueryHistory, NIRSpecBadPixelStats + + from jwql.website.apps.jwql.monitor_models.claw import NIRCamClawQueryHistory, NIRCamClawStats + + from jwql.website.apps.jwql.monitor_models.dark_current import FGSDarkDarkCurrent, FGSDarkPixelStats, FGSDarkQueryHistory + from jwql.website.apps.jwql.monitor_models.dark_current import MIRIDarkDarkCurrent, MIRIDarkPixelStats, MIRIDarkQueryHistory + from jwql.website.apps.jwql.monitor_models.dark_current import NIRCamDarkDarkCurrent, NIRCamDarkPixelStats, NIRCamDarkQueryHistory + from jwql.website.apps.jwql.monitor_models.dark_current import NIRISSDarkDarkCurrent, NIRISSDarkPixelStats, NIRISSDarkQueryHistory + from jwql.website.apps.jwql.monitor_models.dark_current import NIRSpecDarkDarkCurrent, NIRSpecDarkPixelStats, NIRSpecDarkQueryHistory + + from jwql.website.apps.jwql.monitor_models.edb import FGSEdbBlocksStats, FGSEdbDailyStats, FGSEdbEveryChangeStats, FGSEdbTimeIntervalStats, FGSEdbTimeStats + from jwql.website.apps.jwql.monitor_models.edb import MIRIEdbBlocksStats, MIRIEdbDailyStats, MIRIEdbEveryChangeStats, MIRIEdbTimeIntervalStats, MIRIEdbTimeStats + from jwql.website.apps.jwql.monitor_models.edb import NIRCamEdbBlocksStats, NIRCamEdbDailyStats, NIRCamEdbEveryChangeStats, NIRCamEdbTimeIntervalStats, NIRCamEdbTimeStats + from jwql.website.apps.jwql.monitor_models.edb import NIRISSEdbBlocksStats, NIRISSEdbDailyStats, NIRISSEdbEveryChangeStats, NIRISSEdbTimeIntervalStats, NIRISSEdbTimeStats + from jwql.website.apps.jwql.monitor_models.edb import NIRSpecEdbBlocksStats, NIRSpecEdbDailyStats, NIRSpecEdbEveryChangeStats, NIRSpecEdbTimeIntervalStats, NIRSpecEdbTimeStats + + from jwql.website.apps.jwql.monitor_models.readnoise import FGSReadnoiseQueryHistory, FGSReadnoiseStats + from jwql.website.apps.jwql.monitor_models.readnoise import MIRIReadnoiseQueryHistory, MIRIReadnoiseStats + from jwql.website.apps.jwql.monitor_models.readnoise import NIRCamReadnoiseQueryHistory, NIRCamReadnoiseStats + from jwql.website.apps.jwql.monitor_models.readnoise import NIRISSReadnoiseQueryHistory, NIRISSReadnoiseStats + from jwql.website.apps.jwql.monitor_models.readnoise import NIRSpecReadnoiseQueryHistory, NIRSpecReadnoiseStats From 66a46be61622ee2e75157f8718adc865b6ab1cb8 Mon Sep 17 00:00:00 2001 From: Bradley Sappington <101193271+BradleySappington@users.noreply.github.com> Date: Wed, 17 Apr 2024 16:09:40 -0400 Subject: [PATCH 31/33] Update CHANGES.rst 1.2.7 prep --- CHANGES.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index d62e0110e..e5f3bed31 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,5 +1,16 @@ ## What's Changed +1.2.7 (2024-04-18) +================== + +Web Application +~~~~~~~~~~~~~~~ + +Project & API Documentation +~~~~~~~~~~~~~~~~~~~~~~~~~~~ +- Import monitor models by @bhilbert4 + + 1.2.6 (2024-04-15) ================== From 0dd8e3165e2f09815bcebdaf16f1e9b41f84b051 Mon Sep 17 00:00:00 2001 From: Bradley Sappington <101193271+BradleySappington@users.noreply.github.com> Date: Thu, 18 Apr 2024 15:51:03 -0400 Subject: [PATCH 32/33] final model define for faking (#1544) * final model define for faking * update init to see models for define * lint --- jwql/utils/constants.py | 1 + ...maly_filesystemcharacteristics_and_more.py | 713 ++++++++++++++++++ .../apps/jwql/monitor_pages/__init__.py | 10 + 3 files changed, 724 insertions(+) create mode 100644 jwql/website/apps/jwql/migrations/0023_centralstorage_fgsanomaly_filesystemcharacteristics_and_more.py diff --git a/jwql/utils/constants.py b/jwql/utils/constants.py index 5114542d6..77d1c7a50 100644 --- a/jwql/utils/constants.py +++ b/jwql/utils/constants.py @@ -703,6 +703,7 @@ "nircam_dark_dark_current", "nircam_dark_pixel_stats", "nircam_dark_query_history", "niriss_dark_dark_current", "niriss_dark_pixel_stats", "niriss_dark_query_history", "nirspec_dark_dark_current", "nirspec_dark_pixel_stats", "nirspec_dark_query_history", + "nirspec_grating_query_history", "fgs_edb_blocks_stats", "fgs_edb_daily_stats", "fgs_edb_every_change_stats", "fgs_edb_time_interval_stats", "fgs_edb_time_stats", "miri_edb_blocks_stats", "miri_edb_daily_stats", "miri_edb_every_change_stats", "miri_edb_time_interval_stats", "miri_edb_time_stats", "nircam_edb_blocks_stats", "nircam_edb_daily_stats", "nircam_edb_every_change_stats", "nircam_edb_time_interval_stats", "nircam_edb_time_stats", diff --git a/jwql/website/apps/jwql/migrations/0023_centralstorage_fgsanomaly_filesystemcharacteristics_and_more.py b/jwql/website/apps/jwql/migrations/0023_centralstorage_fgsanomaly_filesystemcharacteristics_and_more.py new file mode 100644 index 000000000..2789628a9 --- /dev/null +++ b/jwql/website/apps/jwql/migrations/0023_centralstorage_fgsanomaly_filesystemcharacteristics_and_more.py @@ -0,0 +1,713 @@ +# Generated by Django 4.1.7 on 2024-04-18 18:37 + +import django.contrib.postgres.fields +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('jwql', '0022_nirspecedbtimestats_nirspecedbtimeintervalstats_and_more'), + ] + + operations = [ + migrations.CreateModel( + name='CentralStorage', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('date', models.DateTimeField()), + ('area', models.CharField()), + ('size', models.FloatField()), + ('used', models.FloatField()), + ('available', models.FloatField()), + ], + options={ + 'db_table': 'central_storage', + 'managed': True, + }, + ), + migrations.CreateModel( + name='FgsAnomaly', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('rootname', models.CharField()), + ('flag_date', models.DateTimeField()), + ('user', models.CharField()), + ('cosmic_ray_shower', models.BooleanField()), + ('diffraction_spike', models.BooleanField()), + ('excessive_saturation', models.BooleanField()), + ('guidestar_failure', models.BooleanField()), + ('persistence', models.BooleanField()), + ('crosstalk', models.BooleanField()), + ('data_transfer_error', models.BooleanField()), + ('ghost', models.BooleanField()), + ('snowball', models.BooleanField()), + ('other', models.BooleanField()), + ], + options={ + 'db_table': 'fgs_anomaly', + 'managed': True, + }, + ), + migrations.CreateModel( + name='FilesystemCharacteristics', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('date', models.DateTimeField()), + ('instrument', models.TextField()), + ('filter_pupil', models.TextField(blank=True, null=True)), + ('obs_per_filter_pupil', models.TextField(blank=True, null=True)), + ], + options={ + 'db_table': 'filesystem_characteristics', + 'managed': True, + }, + ), + migrations.CreateModel( + name='FilesystemGeneral', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('date', models.DateTimeField(unique=True)), + ('total_file_count', models.IntegerField()), + ('total_file_size', models.FloatField()), + ('fits_file_count', models.IntegerField()), + ('fits_file_size', models.FloatField()), + ('used', models.FloatField()), + ('available', models.FloatField()), + ], + options={ + 'db_table': 'filesystem_general', + 'managed': True, + }, + ), + migrations.CreateModel( + name='MiriAnomaly', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('rootname', models.CharField()), + ('flag_date', models.DateTimeField()), + ('user', models.CharField()), + ('cosmic_ray_shower', models.BooleanField()), + ('diffraction_spike', models.BooleanField()), + ('excessive_saturation', models.BooleanField()), + ('guidestar_failure', models.BooleanField()), + ('persistence', models.BooleanField()), + ('column_pull_up', models.BooleanField()), + ('internal_reflection', models.BooleanField()), + ('row_pull_down', models.BooleanField()), + ('other', models.BooleanField()), + ('column_pull_down', models.BooleanField()), + ('mrs_glow', models.BooleanField(db_column='MRS_Glow')), + ('mrs_zipper', models.BooleanField(db_column='MRS_Zipper')), + ('row_pull_up', models.BooleanField()), + ('lrs_contamination', models.BooleanField(db_column='LRS_Contamination')), + ('tree_rings', models.BooleanField()), + ], + options={ + 'db_table': 'miri_anomaly', + 'managed': True, + }, + ), + migrations.CreateModel( + name='Monitor', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('monitor_name', models.CharField()), + ('start_time', models.DateTimeField()), + ('end_time', models.DateTimeField(blank=True, null=True)), + ('status', models.TextField(blank=True, null=True)), + ('log_file', models.CharField()), + ], + options={ + 'db_table': 'monitor', + 'managed': True, + }, + ), + migrations.CreateModel( + name='NircamAnomaly', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('rootname', models.CharField()), + ('flag_date', models.DateTimeField()), + ('user', models.CharField()), + ('cosmic_ray_shower', models.BooleanField()), + ('diffraction_spike', models.BooleanField()), + ('excessive_saturation', models.BooleanField()), + ('guidestar_failure', models.BooleanField()), + ('persistence', models.BooleanField()), + ('crosstalk', models.BooleanField()), + ('data_transfer_error', models.BooleanField()), + ('ghost', models.BooleanField()), + ('snowball', models.BooleanField()), + ('dragons_breath', models.BooleanField()), + ('other', models.BooleanField()), + ('scattered_light', models.BooleanField()), + ('claws', models.BooleanField()), + ('wisps', models.BooleanField()), + ('tilt_event', models.BooleanField()), + ], + options={ + 'db_table': 'nircam_anomaly', + 'managed': True, + }, + ), + migrations.CreateModel( + name='NirissAnomaly', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('rootname', models.CharField()), + ('flag_date', models.DateTimeField()), + ('user', models.CharField()), + ('cosmic_ray_shower', models.BooleanField()), + ('diffraction_spike', models.BooleanField()), + ('excessive_saturation', models.BooleanField()), + ('guidestar_failure', models.BooleanField()), + ('persistence', models.BooleanField()), + ('crosstalk', models.BooleanField()), + ('data_transfer_error', models.BooleanField()), + ('ghost', models.BooleanField()), + ('snowball', models.BooleanField()), + ('other', models.BooleanField()), + ('scattered_light', models.TextField()), + ('light_saber', models.TextField()), + ], + options={ + 'db_table': 'niriss_anomaly', + 'managed': True, + }, + ), + migrations.CreateModel( + name='NirspecAnomaly', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('rootname', models.CharField()), + ('flag_date', models.DateTimeField()), + ('user', models.CharField()), + ('cosmic_ray_shower', models.BooleanField()), + ('diffraction_spike', models.BooleanField()), + ('excessive_saturation', models.BooleanField()), + ('guidestar_failure', models.BooleanField()), + ('persistence', models.BooleanField()), + ('crosstalk', models.BooleanField()), + ('data_transfer_error', models.BooleanField()), + ('ghost', models.BooleanField()), + ('snowball', models.BooleanField()), + ('dominant_msa_leakage', models.BooleanField(db_column='Dominant_MSA_Leakage')), + ('optical_short', models.BooleanField()), + ('other', models.BooleanField()), + ], + options={ + 'db_table': 'nirspec_anomaly', + 'managed': True, + }, + ), + migrations.CreateModel( + name='NIRSpecTaStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(blank=True, null=True)), + ('uncal_filename', models.CharField(blank=True, max_length=1000, null=True)), + ('aperture', models.CharField(blank=True, max_length=40, null=True)), + ('detector', models.CharField(blank=True, max_length=40, null=True)), + ('subarray', models.CharField(blank=True, max_length=40, null=True)), + ('read_pattern', models.CharField(blank=True, max_length=40, null=True)), + ('nints', models.CharField(blank=True, max_length=10, null=True)), + ('ngroups', models.CharField(blank=True, max_length=10, null=True)), + ('expstart', models.CharField(blank=True, max_length=50, null=True)), + ('full_image_mean', models.FloatField(blank=True, null=True)), + ('full_image_stddev', models.FloatField(blank=True, null=True)), + ('full_image_n', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('full_image_bin_centers', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('diff_image_mean', models.FloatField(blank=True, null=True)), + ('diff_image_stddev', models.FloatField(blank=True, null=True)), + ('diff_image_n', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('diff_image_bin_centers', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('amp1_mean', models.FloatField(blank=True, null=True)), + ('amp1_stddev', models.FloatField(blank=True, null=True)), + ('amp1_n', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('amp1_bin_centers', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('amp2_mean', models.FloatField(blank=True, null=True)), + ('amp2_stddev', models.FloatField(blank=True, null=True)), + ('amp2_n', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('amp2_bin_centers', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('amp3_mean', models.FloatField(blank=True, null=True)), + ('amp3_stddev', models.FloatField(blank=True, null=True)), + ('amp3_n', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('amp3_bin_centers', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('amp4_mean', models.FloatField(blank=True, null=True)), + ('amp4_stddev', models.FloatField(blank=True, null=True)), + ('amp4_n', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('amp4_bin_centers', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ], + options={ + 'db_table': 'nirspec_ta_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRSpecTaQueryHistory', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('instrument', models.CharField(blank=True, max_length=7, null=True)), + ('aperture', models.CharField(blank=True, max_length=40, null=True)), + ('start_time_mjd', models.FloatField(blank=True, null=True)), + ('end_time_mjd', models.FloatField(blank=True, null=True)), + ('entries_found', models.IntegerField(blank=True, null=True)), + ('files_found', models.IntegerField(blank=True, null=True)), + ('run_monitor', models.BooleanField(blank=True, null=True)), + ('entry_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'nirspec_ta_query_history', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRSpecGratingStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('time', models.CharField(blank=True, max_length=50, null=True)), + ('inrsh_gwa_adcmgain', models.FloatField(blank=True, null=True)), + ('inrsh_gwa_adcmoffset', models.FloatField(blank=True, null=True)), + ('inrsh_gwa_motor_vref', models.FloatField(blank=True, null=True)), + ('prism_inrsi_c_gwa_x_position', models.FloatField(blank=True, null=True)), + ('prism_inrsi_c_gwa_y_position', models.FloatField(blank=True, null=True)), + ('mirror_inrsi_c_gwa_x_position', models.FloatField(blank=True, null=True)), + ('mirror_inrsi_c_gwa_y_position', models.FloatField(blank=True, null=True)), + ('g140h_inrsi_c_gwa_x_position', models.FloatField(blank=True, null=True)), + ('g140h_inrsi_c_gwa_y_position', models.FloatField(blank=True, null=True)), + ('g235h_inrsi_c_gwa_x_position', models.FloatField(blank=True, null=True)), + ('g235h_inrsi_c_gwa_y_position', models.FloatField(blank=True, null=True)), + ('g395h_inrsi_c_gwa_x_position', models.FloatField(blank=True, null=True)), + ('g395h_inrsi_c_gwa_y_position', models.FloatField(blank=True, null=True)), + ('g140m_inrsi_c_gwa_x_position', models.FloatField(blank=True, null=True)), + ('g140m_inrsi_c_gwa_y_position', models.FloatField(blank=True, null=True)), + ('g235m_inrsi_c_gwa_x_position', models.FloatField(blank=True, null=True)), + ('g235m_inrsi_c_gwa_y_position', models.FloatField(blank=True, null=True)), + ('g395m_inrsi_c_gwa_x_position', models.FloatField(blank=True, null=True)), + ('g395m_inrsi_c_gwa_y_position', models.FloatField(blank=True, null=True)), + ], + options={ + 'db_table': 'nirspec_grating_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRSpecGratingQueryHistory', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('start_time_mjd', models.FloatField(blank=True, null=True)), + ('end_time_mjd', models.FloatField(blank=True, null=True)), + ('run_monitor', models.BooleanField(blank=True, null=True)), + ('entry_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'nirspec_grating_query_history', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRSpecCosmicRayStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('aperture', models.CharField(blank=True, max_length=40, null=True)), + ('source_file', models.CharField(max_length=1000, null=True)), + ('obs_start_time', models.DateTimeField(blank=True, null=True)), + ('obs_end_time', models.DateTimeField(blank=True, null=True)), + ('jump_count', models.IntegerField(blank=True, null=True)), + ('jump_rate', models.FloatField(blank=True, null=True)), + ('magnitude', models.TextField(blank=True, null=True)), + ('outliers', models.TextField(blank=True, null=True)), + ], + options={ + 'db_table': 'nirspec_cosmic_ray_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRSpecCosmicRayQueryHistory', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('instrument', models.CharField(blank=True, max_length=7, null=True)), + ('aperture', models.CharField(blank=True, max_length=40, null=True)), + ('start_time_mjd', models.FloatField(blank=True, null=True)), + ('end_time_mjd', models.FloatField(blank=True, null=True)), + ('files_found', models.IntegerField(blank=True, null=True)), + ('run_monitor', models.BooleanField(blank=True, null=True)), + ], + options={ + 'db_table': 'nirspec_cosmic_ray_query_history', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRSpecBiasStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('aperture', models.CharField(blank=True, max_length=40, null=True)), + ('uncal_filename', models.CharField(blank=True, max_length=1000, null=True)), + ('cal_filename', models.CharField(blank=True, max_length=1000, null=True)), + ('cal_image', models.CharField(blank=True, max_length=1000, null=True)), + ('expstart', models.CharField(blank=True, max_length=50, null=True)), + ('mean', models.FloatField(blank=True, null=True)), + ('median', models.FloatField(blank=True, null=True)), + ('stddev', models.FloatField(blank=True, null=True)), + ('collapsed_rows', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('collapsed_columns', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('counts', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('bin_centers', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('amp1_even_med', models.FloatField(blank=True, null=True)), + ('amp1_odd_med', models.FloatField(blank=True, null=True)), + ('amp2_even_med', models.FloatField(blank=True, null=True)), + ('amp2_odd_med', models.FloatField(blank=True, null=True)), + ('amp3_even_med', models.FloatField(blank=True, null=True)), + ('amp3_odd_med', models.FloatField(blank=True, null=True)), + ('amp4_even_med', models.FloatField(blank=True, null=True)), + ('amp4_odd_med', models.FloatField(blank=True, null=True)), + ('entry_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'nirspec_bias_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRSpecBiasQueryHistory', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('instrument', models.CharField(blank=True, max_length=7, null=True)), + ('aperture', models.CharField(blank=True, max_length=40, null=True)), + ('start_time_mjd', models.FloatField(blank=True, null=True)), + ('end_time_mjd', models.FloatField(blank=True, null=True)), + ('entries_found', models.IntegerField(blank=True, null=True)), + ('files_found', models.IntegerField(blank=True, null=True)), + ('run_monitor', models.BooleanField(blank=True, null=True)), + ('entry_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'nirspec_bias_query_history', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRISSCosmicRayStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('aperture', models.CharField(blank=True, max_length=40, null=True)), + ('source_file', models.CharField(max_length=1000, null=True)), + ('obs_start_time', models.DateTimeField(blank=True, null=True)), + ('obs_end_time', models.DateTimeField(blank=True, null=True)), + ('jump_count', models.IntegerField(blank=True, null=True)), + ('jump_rate', models.FloatField(blank=True, null=True)), + ('magnitude', models.TextField(blank=True, null=True)), + ('outliers', models.TextField(blank=True, null=True)), + ], + options={ + 'db_table': 'niriss_cosmic_ray_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRISSCosmicRayQueryHistory', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('instrument', models.CharField(blank=True, max_length=7, null=True)), + ('aperture', models.CharField(blank=True, max_length=40, null=True)), + ('start_time_mjd', models.FloatField(blank=True, null=True)), + ('end_time_mjd', models.FloatField(blank=True, null=True)), + ('files_found', models.IntegerField(blank=True, null=True)), + ('run_monitor', models.BooleanField(blank=True, null=True)), + ], + options={ + 'db_table': 'niriss_cosmic_ray_query_history', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRISSBiasStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('aperture', models.CharField(blank=True, max_length=40, null=True)), + ('uncal_filename', models.CharField(blank=True, max_length=1000, null=True)), + ('cal_filename', models.CharField(blank=True, max_length=1000, null=True)), + ('cal_image', models.CharField(blank=True, max_length=1000, null=True)), + ('expstart', models.CharField(blank=True, max_length=50, null=True)), + ('mean', models.FloatField(blank=True, null=True)), + ('median', models.FloatField(blank=True, null=True)), + ('stddev', models.FloatField(blank=True, null=True)), + ('collapsed_rows', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('collapsed_columns', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('counts', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('bin_centers', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('amp1_even_med', models.FloatField(blank=True, null=True)), + ('amp1_odd_med', models.FloatField(blank=True, null=True)), + ('amp2_even_med', models.FloatField(blank=True, null=True)), + ('amp2_odd_med', models.FloatField(blank=True, null=True)), + ('amp3_even_med', models.FloatField(blank=True, null=True)), + ('amp3_odd_med', models.FloatField(blank=True, null=True)), + ('amp4_even_med', models.FloatField(blank=True, null=True)), + ('amp4_odd_med', models.FloatField(blank=True, null=True)), + ('entry_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'niriss_bias_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRISSBiasQueryHistory', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('instrument', models.CharField(blank=True, max_length=7, null=True)), + ('aperture', models.CharField(blank=True, max_length=40, null=True)), + ('start_time_mjd', models.FloatField(blank=True, null=True)), + ('end_time_mjd', models.FloatField(blank=True, null=True)), + ('entries_found', models.IntegerField(blank=True, null=True)), + ('files_found', models.IntegerField(blank=True, null=True)), + ('run_monitor', models.BooleanField(blank=True, null=True)), + ('entry_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'niriss_bias_query_history', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRCamCosmicRayStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('aperture', models.CharField(blank=True, max_length=40, null=True)), + ('source_file', models.CharField(max_length=1000, null=True)), + ('obs_start_time', models.DateTimeField(blank=True, null=True)), + ('obs_end_time', models.DateTimeField(blank=True, null=True)), + ('jump_count', models.IntegerField(blank=True, null=True)), + ('jump_rate', models.FloatField(blank=True, null=True)), + ('magnitude', models.TextField(blank=True, null=True)), + ('outliers', models.TextField(blank=True, null=True)), + ], + options={ + 'db_table': 'nircam_cosmic_ray_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRCamCosmicRayQueryHistory', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('instrument', models.CharField(blank=True, max_length=7, null=True)), + ('aperture', models.CharField(blank=True, max_length=40, null=True)), + ('start_time_mjd', models.FloatField(blank=True, null=True)), + ('end_time_mjd', models.FloatField(blank=True, null=True)), + ('files_found', models.IntegerField(blank=True, null=True)), + ('run_monitor', models.BooleanField(blank=True, null=True)), + ], + options={ + 'db_table': 'nircam_cosmic_ray_query_history', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRCamBiasStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('aperture', models.CharField(blank=True, max_length=40, null=True)), + ('uncal_filename', models.CharField(blank=True, max_length=1000, null=True)), + ('cal_filename', models.CharField(blank=True, max_length=1000, null=True)), + ('cal_image', models.CharField(blank=True, max_length=1000, null=True)), + ('expstart', models.CharField(blank=True, max_length=50, null=True)), + ('mean', models.FloatField(blank=True, null=True)), + ('median', models.FloatField(blank=True, null=True)), + ('stddev', models.FloatField(blank=True, null=True)), + ('collapsed_rows', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('collapsed_columns', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('counts', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('bin_centers', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('amp1_even_med', models.FloatField(blank=True, null=True)), + ('amp1_odd_med', models.FloatField(blank=True, null=True)), + ('amp2_even_med', models.FloatField(blank=True, null=True)), + ('amp2_odd_med', models.FloatField(blank=True, null=True)), + ('amp3_even_med', models.FloatField(blank=True, null=True)), + ('amp3_odd_med', models.FloatField(blank=True, null=True)), + ('amp4_even_med', models.FloatField(blank=True, null=True)), + ('amp4_odd_med', models.FloatField(blank=True, null=True)), + ('entry_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'nircam_bias_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='NIRCamBiasQueryHistory', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('instrument', models.CharField(blank=True, max_length=7, null=True)), + ('aperture', models.CharField(blank=True, max_length=40, null=True)), + ('start_time_mjd', models.FloatField(blank=True, null=True)), + ('end_time_mjd', models.FloatField(blank=True, null=True)), + ('entries_found', models.IntegerField(blank=True, null=True)), + ('files_found', models.IntegerField(blank=True, null=True)), + ('run_monitor', models.BooleanField(blank=True, null=True)), + ('entry_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'nircam_bias_query_history', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='MIRITaStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('cal_file_name', models.CharField(blank=True, max_length=1000, null=True)), + ('obs_end_time', models.DateTimeField(blank=True, null=True)), + ('aperture', models.CharField(blank=True, max_length=40, null=True)), + ('detector', models.CharField(blank=True, max_length=40, null=True)), + ('targx', models.FloatField(blank=True, null=True)), + ('targy', models.FloatField(blank=True, null=True)), + ('offset', models.FloatField(blank=True, null=True)), + ('full_im_path', models.CharField(blank=True, max_length=1000, null=True)), + ('zoom_im_path', models.CharField(blank=True, max_length=1000, null=True)), + ], + options={ + 'db_table': 'miri_ta_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='MIRITaQueryHistory', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('instrument', models.CharField(blank=True, max_length=7, null=True)), + ('aperture', models.CharField(blank=True, max_length=40, null=True)), + ('start_time_mjd', models.FloatField(blank=True, null=True)), + ('end_time_mjd', models.FloatField(blank=True, null=True)), + ('entries_found', models.IntegerField(blank=True, null=True)), + ('files_found', models.IntegerField(blank=True, null=True)), + ('run_monitor', models.BooleanField(blank=True, null=True)), + ('entry_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'miri_ta_query_history', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='MIRICosmicRayStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('aperture', models.CharField(blank=True, max_length=40, null=True)), + ('source_file', models.CharField(max_length=1000, null=True)), + ('obs_start_time', models.DateTimeField(blank=True, null=True)), + ('obs_end_time', models.DateTimeField(blank=True, null=True)), + ('jump_count', models.IntegerField(blank=True, null=True)), + ('jump_rate', models.FloatField(blank=True, null=True)), + ('magnitude', models.TextField(blank=True, null=True)), + ('outliers', models.TextField(blank=True, null=True)), + ], + options={ + 'db_table': 'miri_cosmic_ray_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='MIRICosmicRayQueryHistory', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('instrument', models.CharField(blank=True, max_length=7, null=True)), + ('aperture', models.CharField(blank=True, max_length=40, null=True)), + ('start_time_mjd', models.FloatField(blank=True, null=True)), + ('end_time_mjd', models.FloatField(blank=True, null=True)), + ('files_found', models.IntegerField(blank=True, null=True)), + ('run_monitor', models.BooleanField(blank=True, null=True)), + ], + options={ + 'db_table': 'miri_cosmic_ray_query_history', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='FilesystemInstrument', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('date', models.DateTimeField()), + ('instrument', models.TextField()), + ('filetype', models.TextField()), + ('count', models.IntegerField()), + ('size', models.FloatField()), + ], + options={ + 'db_table': 'filesystem_instrument', + 'managed': True, + 'unique_together': {('date', 'instrument', 'filetype')}, + }, + ), + migrations.CreateModel( + name='FGSCosmicRayStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('aperture', models.CharField(blank=True, max_length=40, null=True)), + ('source_file', models.CharField(max_length=1000, null=True)), + ('obs_start_time', models.DateTimeField(blank=True, null=True)), + ('obs_end_time', models.DateTimeField(blank=True, null=True)), + ('jump_count', models.IntegerField(blank=True, null=True)), + ('jump_rate', models.FloatField(blank=True, null=True)), + ('magnitude', models.TextField(blank=True, null=True)), + ('outliers', models.TextField(blank=True, null=True)), + ], + options={ + 'db_table': 'fgs_cosmic_ray_stats', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + migrations.CreateModel( + name='FGSCosmicRayQueryHistory', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_date', models.DateTimeField(unique=True)), + ('instrument', models.CharField(blank=True, max_length=7, null=True)), + ('aperture', models.CharField(blank=True, max_length=40, null=True)), + ('start_time_mjd', models.FloatField(blank=True, null=True)), + ('end_time_mjd', models.FloatField(blank=True, null=True)), + ('files_found', models.IntegerField(blank=True, null=True)), + ('run_monitor', models.BooleanField(blank=True, null=True)), + ], + options={ + 'db_table': 'fgs_cosmic_ray_query_history', + 'managed': True, + 'unique_together': {('id', 'entry_date')}, + }, + ), + ] diff --git a/jwql/website/apps/jwql/monitor_pages/__init__.py b/jwql/website/apps/jwql/monitor_pages/__init__.py index 0ba32e541..ba9fc9d4a 100644 --- a/jwql/website/apps/jwql/monitor_pages/__init__.py +++ b/jwql/website/apps/jwql/monitor_pages/__init__.py @@ -13,8 +13,14 @@ from jwql.website.apps.jwql.monitor_models.bad_pixel import NIRCamBadPixelQueryHistory, NIRCamBadPixelStats, NIRISSBadPixelQueryHistory, NIRISSBadPixelStats from jwql.website.apps.jwql.monitor_models.bad_pixel import NIRSpecBadPixelQueryHistory, NIRSpecBadPixelStats + from jwql.website.apps.jwql.monitor_models.bias import NIRCamBiasQueryHistory + from jwql.website.apps.jwql.monitor_models.claw import NIRCamClawQueryHistory, NIRCamClawStats + from jwql.website.apps.jwql.monitor_models.common import Monitor + + from jwql.website.apps.jwql.monitor_models.cosmic_ray import FGSCosmicRayQueryHistory + from jwql.website.apps.jwql.monitor_models.dark_current import FGSDarkDarkCurrent, FGSDarkPixelStats, FGSDarkQueryHistory from jwql.website.apps.jwql.monitor_models.dark_current import MIRIDarkDarkCurrent, MIRIDarkPixelStats, MIRIDarkQueryHistory from jwql.website.apps.jwql.monitor_models.dark_current import NIRCamDarkDarkCurrent, NIRCamDarkPixelStats, NIRCamDarkQueryHistory @@ -27,8 +33,12 @@ from jwql.website.apps.jwql.monitor_models.edb import NIRISSEdbBlocksStats, NIRISSEdbDailyStats, NIRISSEdbEveryChangeStats, NIRISSEdbTimeIntervalStats, NIRISSEdbTimeStats from jwql.website.apps.jwql.monitor_models.edb import NIRSpecEdbBlocksStats, NIRSpecEdbDailyStats, NIRSpecEdbEveryChangeStats, NIRSpecEdbTimeIntervalStats, NIRSpecEdbTimeStats + from jwql.website.apps.jwql.monitor_models.grating import NIRSpecGratingQueryHistory + from jwql.website.apps.jwql.monitor_models.readnoise import FGSReadnoiseQueryHistory, FGSReadnoiseStats from jwql.website.apps.jwql.monitor_models.readnoise import MIRIReadnoiseQueryHistory, MIRIReadnoiseStats from jwql.website.apps.jwql.monitor_models.readnoise import NIRCamReadnoiseQueryHistory, NIRCamReadnoiseStats from jwql.website.apps.jwql.monitor_models.readnoise import NIRISSReadnoiseQueryHistory, NIRISSReadnoiseStats from jwql.website.apps.jwql.monitor_models.readnoise import NIRSpecReadnoiseQueryHistory, NIRSpecReadnoiseStats + + from jwql.website.apps.jwql.monitor_models.ta import MIRITaQueryHistory From 17e0a498186e6bf0c25cd175b56f020e0858be19 Mon Sep 17 00:00:00 2001 From: Bradley Sappington <101193271+BradleySappington@users.noreply.github.com> Date: Thu, 18 Apr 2024 15:54:21 -0400 Subject: [PATCH 33/33] Update CHANGES.rst define more models to be faked in migration --- CHANGES.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index e5f3bed31..47c7c630b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,5 +1,16 @@ ## What's Changed +1.2.8 (2024-04-18) +================== + +Web Application +~~~~~~~~~~~~~~~ + +Project & API Documentation +~~~~~~~~~~~~~~~~~~~~~~~~~~~ +- final model define for faking by @BradleySappington + + 1.2.7 (2024-04-18) ==================