-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
202 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Generated by Django 4.0.4 on 2024-03-08 15:49 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
('bhtom_dataproducts', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Catalogs', | ||
fields=[ | ||
('id', models.IntegerField(primary_key=True, serialize=False)), | ||
('survey', models.TextField(editable=False)), | ||
('filters', models.TextField(editable=False)), | ||
('isActive', models.BooleanField(default=True)), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='Calibration_data', | ||
fields=[ | ||
('id', models.AutoField(db_index=True, primary_key=True, serialize=False)), | ||
('status', models.CharField(choices=[('C', 'TO DO'), ('P', 'IN PROGRESS'), ('S', 'SUCCESS'), ('E', 'ERROR')], db_index=True, default='C', max_length=1)), | ||
('status_message', models.TextField(blank=True, null=True)), | ||
('mjd', models.FloatField()), | ||
('exp_time', models.FloatField(blank=True, null=True)), | ||
('mag', models.FloatField(blank=True, null=True)), | ||
('mag_error', models.FloatField(blank=True, null=True)), | ||
('ra', models.FloatField(blank=True, null=True)), | ||
('dec', models.FloatField(blank=True, null=True)), | ||
('zeropoint', models.FloatField(blank=True, null=True)), | ||
('outlier_fraction', models.FloatField(blank=True, null=True)), | ||
('scatter', models.FloatField(blank=True, null=True)), | ||
('npoints', models.IntegerField(blank=True, null=True)), | ||
('processing_time', models.FloatField(blank=True, null=True)), | ||
('created', models.DateTimeField(blank=True, editable=False, null=True)), | ||
('modified', models.DateTimeField(blank=True, null=True)), | ||
('start_processing', models.DateTimeField(blank=True, null=True)), | ||
('best_filter', models.CharField(blank=True, max_length=5, null=True)), | ||
('survey', models.CharField(blank=True, max_length=32, null=True)), | ||
('match_distans', models.FloatField(default=0.5)), | ||
('no_plot', models.BooleanField(default=True)), | ||
('calibration_plot', models.TextField(blank=True, null=True)), | ||
('number_tries', models.IntegerField(default=0)), | ||
('dataproduct', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bhtom_dataproducts.dataproduct')), | ||
('use_catalog', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='bhtom_calibration.catalogs')), | ||
], | ||
options={ | ||
'verbose_name': 'cpcs processing file', | ||
'verbose_name_plural': 'calibration_data', | ||
}, | ||
), | ||
] |
24 changes: 24 additions & 0 deletions
24
bhtom2/bhtom_calibration/migrations/0002_calibration_data_calibration_log_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Generated by Django 4.0.4 on 2024-06-11 08:27 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('bhtom_calibration', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='calibration_data', | ||
name='calibration_log', | ||
field=models.URLField(blank=True, default=None, null=True), | ||
), | ||
migrations.AlterField( | ||
model_name='calibration_data', | ||
name='use_catalog', | ||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='bhtom_calibration.catalogs'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# Generated by Django 4.0.4 on 2024-03-08 15:49 | ||
|
||
import bhtom2.bhtom_observatory.models | ||
from django.conf import settings | ||
import django.core.validators | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Observatory', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(max_length=255, unique=True, verbose_name='Observatory name')), | ||
('lon', models.FloatField(db_index=True, validators=[django.core.validators.MinValueValidator(-180.0, message='longitude must be greater than -180.'), django.core.validators.MaxValueValidator(180.0, message='longitude must be less than 180.')], verbose_name='Longitude (West is positive) [deg]')), | ||
('lat', models.FloatField(db_index=True, validators=[django.core.validators.MinValueValidator(-180.0, message='latitude must be greater than -90.'), django.core.validators.MaxValueValidator(180.0, message='latitude must be less than 90.')], verbose_name='Latitude (North is positive) [deg]')), | ||
('altitude', models.FloatField(default=0.0, null=True, verbose_name='Altitude [m]')), | ||
('calibration_flg', models.BooleanField(db_index=True, default='False', verbose_name='Only instrumental photometry file')), | ||
('comment', models.TextField(blank=True, null=True, verbose_name='Comments (e.g. hyperlink to the observatory website, camera specifications, telescope info)')), | ||
('approx_lim_mag', models.FloatField(default=18.0, null=True, verbose_name='Approximate limit magnitude [mag]')), | ||
('filters', models.CharField(blank=True, default='V,R,I', max_length=100, null=True, verbose_name='Filters (comma-separated list, as they are visible in FITS)')), | ||
('origin', models.CharField(blank=True, max_length=255, null=True, verbose_name='Origin')), | ||
('telescope', models.CharField(blank=True, max_length=255, null=True, verbose_name='Telescope name')), | ||
('aperture', models.FloatField(blank=True, default=0.0, null=True, verbose_name='Aperture [m]')), | ||
('focal_length', models.FloatField(default=0.0, null=True, verbose_name='Focal length [mm]')), | ||
('seeing', models.FloatField(blank=True, default=0.0, null=True)), | ||
('created', models.DateTimeField(auto_now_add=True, db_index=True, null=True)), | ||
('modified', models.DateTimeField(auto_now_add=True, null=True)), | ||
('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)), | ||
], | ||
options={ | ||
'verbose_name_plural': 'observatories', | ||
'unique_together': {('name', 'lon', 'lat')}, | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='Camera', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('camera_name', models.CharField(max_length=255, verbose_name='Camera name')), | ||
('active_flg', models.BooleanField(db_index=True, default='False')), | ||
('prefix', models.CharField(blank=True, max_length=100, null=True, unique=True)), | ||
('gain', models.FloatField(default=2, null=True, verbose_name='Gain [e/ADU]')), | ||
('example_file', models.FileField(null=True, upload_to=bhtom2.bhtom_observatory.models.example_file_path, verbose_name='Sample fits')), | ||
('readout_noise', models.FloatField(default=2, null=True, verbose_name='Readout Noise [e]')), | ||
('binning', models.IntegerField(default=1, null=True)), | ||
('saturation_level', models.FloatField(default=63000, null=True, verbose_name='Saturation Level [ADU]')), | ||
('pixel_scale', models.FloatField(default=0.8, null=True, verbose_name='Pixel Scale [arcseconds/pixel]')), | ||
('readout_speed', models.FloatField(default=9999.0, null=True, verbose_name='Readout Speed [microseconds/pixel]')), | ||
('pixel_size', models.FloatField(default=13.5, null=True, verbose_name='Pixel size [micrometers]')), | ||
('date_time_keyword', models.CharField(default='DATE-OBS', max_length=255, verbose_name='Date & Time keyword')), | ||
('time_keyword', models.CharField(default='TIME-OBS', max_length=255, verbose_name='Time keyword')), | ||
('exposure_time_keyword', models.CharField(default='EXPTIME', max_length=255, verbose_name='Exposure time keyword')), | ||
('mode_recognition_keyword', models.CharField(blank=True, default='', max_length=255, null=True, verbose_name='Mode recognition keyword name')), | ||
('additional_info', models.TextField(blank=True, default='', null=True, verbose_name='Additional info')), | ||
('created', models.DateTimeField(auto_now_add=True, db_index=True, null=True)), | ||
('modified', models.DateTimeField(auto_now=True, null=True)), | ||
('observatory', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bhtom_observatory.observatory')), | ||
('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)), | ||
], | ||
options={ | ||
'verbose_name_plural': 'cameras', | ||
'unique_together': {('observatory', 'camera_name')}, | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='ObservatoryMatrix', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('active_flg', models.BooleanField(default='True')), | ||
('comment', models.TextField(blank=True, null=True, verbose_name='Comments (e.g. hyperlink to the observatory website, camera specifications, telescope info)')), | ||
('created', models.DateTimeField(auto_now_add=True, db_index=True)), | ||
('modified', models.DateTimeField(auto_now_add=True, null=True)), | ||
('number_of_uploaded_file', models.IntegerField(default=0)), | ||
('file_size', models.FloatField(default=0)), | ||
('last_file_process', models.DateTimeField(blank=True, null=True)), | ||
('camera', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bhtom_observatory.camera')), | ||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), | ||
], | ||
options={ | ||
'verbose_name_plural': 'observatory matrix', | ||
'unique_together': {('user', 'camera')}, | ||
}, | ||
), | ||
] |
25 changes: 25 additions & 0 deletions
25
bhtom2/bhtom_observatory/migrations/0002_alter_observatory_comment_alter_observatory_lon.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
# Generated by Django 4.0.4 on 2024-05-22 08:17 | ||
|
||
import django.core.validators | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('bhtom_observatory', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='observatory', | ||
name='comment', | ||
field=models.TextField(blank=True, null=True, verbose_name='Comments (e.g. camera specifications, telescope info)'), | ||
), | ||
migrations.AlterField( | ||
model_name='observatory', | ||
name='lon', | ||
field=models.FloatField(db_index=True, validators=[django.core.validators.MinValueValidator(-180.0, message='longitude must be greater than -180.'), django.core.validators.MaxValueValidator(180.0, message='longitude must be less than 180.')], verbose_name='Longitude (East is positive) [deg]'), | ||
), | ||
] |