upper limit NaN fix; ECF & EEF values update

This commit is contained in:
2025-05-13 15:38:03 +03:00
parent d46e5e5fa6
commit ffaa663fdd
3 changed files with 222 additions and 21 deletions

View File

@@ -9,13 +9,9 @@ from django.db.models import UniqueConstraint
class Survey(models.Model):
number = models.IntegerField(unique=True)
# nside = models.IntegerField(
# default=4096
# )
def __str__(self):
return f"Survey {self.number} of NSIDE {self.nside}"
return f"Survey {self.number}"
@@ -23,7 +19,7 @@ class Survey(models.Model):
class Pixel(models.Model):
id = models.AutoField(primary_key=True)
#id = models.AutoField(primary_key=True) # ~2 million pixels for a 4096 survey
survey = models.ForeignKey(
Survey,
@@ -32,17 +28,17 @@ class Pixel(models.Model):
default=0
)
hpid = models.IntegerField(db_index=True)
hpid = models.IntegerField(db_index=True) # up to over 200 million
counts = models.IntegerField()
counts = models.IntegerField() # f4, up to ~44k integer: 2 byte too small
exposure = models.FloatField()
exposure = models.FloatField() # f4, up to ~13300 float
contaminated = models.BooleanField(default=False)
class Meta:
constraints = [
UniqueConstraint(fields=['survey', 'hpid'], name='unique_hpid_per_survey'),
UniqueConstraint(fields=['survey','hpid'], name='unique_hpid_per_survey'),
]
def __str__(self):