Loading db.sqlite3 +16 KiB (176 KiB) File changed.No diff preview for this file type. View original file View changed file imagedb/models.py +38 −3 Original line number Diff line number Diff line Loading @@ -47,6 +47,13 @@ class ImageType(CompositeField): ) class ImageStatistics(models.Model): min = models.FloatField() max = models.FloatField() mean = models.FloatField() stddev = models.FloatField() median = models.FloatField() class ImageBaseFrame(models.Model): exposureTime = models.FloatField() Loading @@ -54,6 +61,12 @@ class ImageBaseFrame(models.Model): naxis1 = models.PositiveIntegerField() naxis2 = models.PositiveIntegerField() imageType = ImageType() stats = models.OneToOneField( ImageStatistics, models.SET_NULL, blank=True, null=True, ) class Meta: abstract = True Loading @@ -67,12 +80,16 @@ class Instrument(models.Model): class Pointing(CompositeField): rightAscension = models.FloatField() declination = models.FloatField() pointingAngle = models.FloatField() orientation = models.FloatField() class ImageSpaceFrame(ImageBaseFrame): observationDateTime = models.DateTimeField() instrument = models.ForeignKey(Instrument, on_delete=models.CASCADE) observationId = models.PositiveIntegerField() ditherNumber = models.PositiveSmallIntegerField() instrument = models.ForeignKey(Instrument, on_delete=models.CASCADE, related_name='+') commandedPointing = Pointing() class Meta: Loading Loading @@ -161,6 +178,21 @@ NISP_GRISM_WHEEL = ( 'CLOSE' ) class DataContainer(models.Model): fileFormat = models.CharField( max_length=10 ) formatIdentifier = models.CharField( max_length=20 ) formatVersion = models.CharField( max_length=20 ) url = models.URLField() class NispRawFrame(ImageSpaceFrame): filterWheelPosition = models.CharField( max_length=10, Loading @@ -171,6 +203,9 @@ class NispRawFrame(ImageSpaceFrame): max_length=10, choices = [(d,d) for d in NISP_GRISM_WHEEL] ) frameFile = models.OneToOneField(DataContainer, on_delete=models.CASCADE) Loading Loading
db.sqlite3 +16 KiB (176 KiB) File changed.No diff preview for this file type. View original file View changed file
imagedb/models.py +38 −3 Original line number Diff line number Diff line Loading @@ -47,6 +47,13 @@ class ImageType(CompositeField): ) class ImageStatistics(models.Model): min = models.FloatField() max = models.FloatField() mean = models.FloatField() stddev = models.FloatField() median = models.FloatField() class ImageBaseFrame(models.Model): exposureTime = models.FloatField() Loading @@ -54,6 +61,12 @@ class ImageBaseFrame(models.Model): naxis1 = models.PositiveIntegerField() naxis2 = models.PositiveIntegerField() imageType = ImageType() stats = models.OneToOneField( ImageStatistics, models.SET_NULL, blank=True, null=True, ) class Meta: abstract = True Loading @@ -67,12 +80,16 @@ class Instrument(models.Model): class Pointing(CompositeField): rightAscension = models.FloatField() declination = models.FloatField() pointingAngle = models.FloatField() orientation = models.FloatField() class ImageSpaceFrame(ImageBaseFrame): observationDateTime = models.DateTimeField() instrument = models.ForeignKey(Instrument, on_delete=models.CASCADE) observationId = models.PositiveIntegerField() ditherNumber = models.PositiveSmallIntegerField() instrument = models.ForeignKey(Instrument, on_delete=models.CASCADE, related_name='+') commandedPointing = Pointing() class Meta: Loading Loading @@ -161,6 +178,21 @@ NISP_GRISM_WHEEL = ( 'CLOSE' ) class DataContainer(models.Model): fileFormat = models.CharField( max_length=10 ) formatIdentifier = models.CharField( max_length=20 ) formatVersion = models.CharField( max_length=20 ) url = models.URLField() class NispRawFrame(ImageSpaceFrame): filterWheelPosition = models.CharField( max_length=10, Loading @@ -171,6 +203,9 @@ class NispRawFrame(ImageSpaceFrame): max_length=10, choices = [(d,d) for d in NISP_GRISM_WHEEL] ) frameFile = models.OneToOneField(DataContainer, on_delete=models.CASCADE) Loading