switched root dir to the application itself
This commit is contained in:
74
models.py
Normal file
74
models.py
Normal file
@@ -0,0 +1,74 @@
|
||||
from django.db import models
|
||||
import uuid
|
||||
|
||||
class CatalogFile(models.Model):
|
||||
|
||||
uuid = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
||||
|
||||
name = models.CharField(max_length=32)
|
||||
|
||||
STATUS_CHOICES = [
|
||||
('PENDING', 'Pending'),
|
||||
('IN_PROGRESS', 'In Progress'),
|
||||
('INGESTED', 'Ingested'),
|
||||
('INDEXED', 'Indexed')
|
||||
]
|
||||
|
||||
status = models.CharField(max_length=11, choices=STATUS_CHOICES, default='PENDING')
|
||||
|
||||
class GaiaSource(models.Model):
|
||||
|
||||
uuid = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
||||
|
||||
catalog_file = models.ForeignKey(
|
||||
CatalogFile, on_delete=models.CASCADE,
|
||||
related_name='sources', null=True
|
||||
)
|
||||
|
||||
solution_id = models.CharField(blank=True, default='', max_length=19)
|
||||
#solution identifier
|
||||
#why charfield and not integerfield?
|
||||
|
||||
designation = models.CharField(max_length=30, blank=True, default='')
|
||||
#unique source designation across all DR
|
||||
|
||||
source_id = models.CharField(max_length=19, blank=True, default='')
|
||||
#unique id within DR again why not integer
|
||||
|
||||
ref_epoch = models.FloatField(default=0.0, null=True)
|
||||
#reference epoch julian years
|
||||
|
||||
ra = models.FloatField(default=0.0, null=True)
|
||||
ra_error = models.FloatField(default=0.0, null=True)
|
||||
#barycentric ra in icrs at ref epoch
|
||||
#error in mas
|
||||
|
||||
dec = models.FloatField(default=0.0, null=True)
|
||||
dec_error = models.FloatField(default=0.0, null=True)
|
||||
#barycentric dec in icrs at ref epoch
|
||||
#error in mas
|
||||
|
||||
parallax = models.FloatField(default=0.0, null=True)
|
||||
parallax_error = models.FloatField(default=0.0, null=True)
|
||||
#parallax and error at ref epoch in mas
|
||||
|
||||
pmra = models.FloatField(default=0.0, null=True)
|
||||
pmra_error = models.FloatField(default=0.0, null=True)
|
||||
#proper motion over ra mas/yr
|
||||
|
||||
pmdec = models.FloatField(default=0.0, null=True)
|
||||
pmdec_error = models.FloatField(default=0.0, null=True)
|
||||
#proper motion over dec mas/yr
|
||||
|
||||
phot_g_mean_mag = models.FloatField(default=0.0, null=True)
|
||||
#mean g band magnitude, vega scale
|
||||
|
||||
phot_bp_mean_mag = models.FloatField(default=0.0, null=True)
|
||||
#mean bp magnitude, vega scale
|
||||
|
||||
phot_rp_mean_mag = models.FloatField(default=0.0, null=True)
|
||||
#mean rp magnitude, vega scale
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user