diff --git a/CHANGES.rst b/CHANGES.rst index 9d4cdc1a5..47c7c630b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,5 +1,57 @@ ## 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) +================== + +Web Application +~~~~~~~~~~~~~~~ + +Project & API Documentation +~~~~~~~~~~~~~~~~~~~~~~~~~~~ +- Import monitor models by @bhilbert4 + + +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) +================== + +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) ================== 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 b73d916c0..9978ec182 --- 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 @@ -300,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: @@ -332,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() @@ -423,11 +428,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]) @@ -469,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() 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 diff --git a/jwql/tests/test_data_containers.py b/jwql/tests/test_data_containers.py index 7c4f68401..4b1f1c4ba 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') @@ -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() @@ -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..77d1c7a50 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 @@ -700,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/utils/interactive_preview_image.py b/jwql/utils/interactive_preview_image.py index 1ffd2ab7b..1845e0d91 100644 --- a/jwql/utils/interactive_preview_image.py +++ b/jwql/utils/interactive_preview_image.py @@ -554,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_click(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) { @@ -594,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_click(limit_reset) + reset.js_on_event('button_click', limit_reset) # also reset when swapping limit style - scale_group.js_on_click(limit_reset) + scale_group.js_on_change('active', limit_reset) # return widgets spacer = Spacer(height=20) diff --git a/jwql/website/apps/jwql/archive_database_update.py b/jwql/website/apps/jwql/archive_database_update.py index 071df24a8..bb7ffe481 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 @@ -160,6 +161,16 @@ def get_updates(update_database): create_archived_proposals_context(inst) +@log_info +@log_fail +def cleanup_past_runs(): + logging.info("Starting cleanup_past_runs") + 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") + + def get_all_possible_filenames_for_proposal(instrument, proposal_num): """Wrapper around a MAST query for filenames from a given instrument/proposal @@ -332,15 +343,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', ''), - read_patt_num=defaults_dict.get('patt_num', 0), - aperture=defaults_dict.get('apername', ''), - subarray=defaults_dict.get('subarray', ''), - pupil=defaults_dict.get('pupil', ''), + 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', 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), expstart=defaults_dict.get('expstart', 0.0)) for key, value in defaults.items(): @@ -369,10 +380,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) @@ -387,6 +402,13 @@ def fill_empty_model(model_name, model_field): except ValueError: pass + # filter(field__exact=DEFAULT_MODEL_CHARFIELD) + try: + 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 + # filter(field=0) try: zero_models = model.objects.filter(**{model_field: 0}) @@ -396,9 +418,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') @@ -458,18 +480,21 @@ 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', ''), - read_patt_num=defaults_dict.get('patt_num', 0), - aperture=defaults_dict.get('apername', ''), - subarray=defaults_dict.get('subarray', ''), - pupil=defaults_dict.get('pupil', ''), + 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', 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), 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() @@ -496,6 +521,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__': 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 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/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'), + ), + ] 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/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/models.py b/jwql/website/apps/jwql/models.py index 5a51b7428..cd770cb18 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) - 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) + 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=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) + 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 diff --git a/jwql/website/apps/jwql/monitor_pages/__init__.py b/jwql/website/apps/jwql/monitor_pages/__init__.py index ed184d7ff..ba9fc9d4a 100644 --- a/jwql/website/apps/jwql/monitor_pages/__init__.py +++ b/jwql/website/apps/jwql/monitor_pages/__init__.py @@ -1 +1,44 @@ +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.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 + 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.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 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""" 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 %}