more apps
This commit is contained in:
0
astrobasis/__init__.py
Normal file
0
astrobasis/__init__.py
Normal file
3
astrobasis/admin.py
Normal file
3
astrobasis/admin.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
5
astrobasis/apps.py
Normal file
5
astrobasis/apps.py
Normal file
@@ -0,0 +1,5 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class AstrobasisConfig(AppConfig):
|
||||
name = 'astrobasis'
|
@@ -0,0 +1,11 @@
|
||||
from django.core.management.base import BaseCommand, CommandError
|
||||
|
||||
from astrobasis.utils import astrobasis_assign_healpix
|
||||
from astrobasis.models import TwoMASS
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = 'Initiates healpix for 2MASS'
|
||||
|
||||
def handle(self, *args, **options):
|
||||
astrobasis_assign_healpix(TwoMASS)
|
||||
self.stdout.write(self.style.SUCCESS('Done'))
|
88
astrobasis/management/commands/00_astrobasis_2mass_init.py
Normal file
88
astrobasis/management/commands/00_astrobasis_2mass_init.py
Normal file
@@ -0,0 +1,88 @@
|
||||
from django.core.management.base import BaseCommand, CommandError
|
||||
import time
|
||||
from datetime import date
|
||||
from heasarc.models import INPUT_DATA_DIR
|
||||
import datetime
|
||||
from django.utils import timezone
|
||||
import astropy
|
||||
from astropy.io import ascii
|
||||
import pandas as pd
|
||||
import pymysql
|
||||
from sqlalchemy import create_engine
|
||||
import numpy.ma as ma
|
||||
from heasarc.tdat import tDat
|
||||
from heasarc.models import HeasarcTable, TableColumn, HeasarcObjectClass
|
||||
from heasarc.models import NSIDE_SOURCES, ORDER
|
||||
from astrobasis.models import TwoMASS
|
||||
|
||||
from srglib.utils import notnan
|
||||
from srglib.utils import boolean_notnan
|
||||
|
||||
from astropy_healpix import HEALPix
|
||||
from astropy.coordinates import SkyCoord # High-level coordinates
|
||||
from astropy.coordinates import ICRS, Galactic, FK4, FK5 # Low-level frames
|
||||
from astropy.coordinates import Angle, Latitude, Longitude # Angles
|
||||
import astropy.units as u
|
||||
|
||||
|
||||
def bulk_load_heasarc_table(filename,reset=False):
|
||||
batch_size = 500
|
||||
|
||||
print("Delete all 2MASS")
|
||||
if(reset):
|
||||
srcs = TwoMASS.objects.all()
|
||||
srcs.delete()
|
||||
|
||||
print("Loading {}".format(filename))
|
||||
data = astropy.table.Table.read(filename, format='ascii.csv',delimiter=';',comment='#',encoding='latin1')
|
||||
print(data.info)
|
||||
|
||||
print("Bulk load to DB")
|
||||
|
||||
"""
|
||||
cols = data.columns
|
||||
for key, value in cols.items():
|
||||
print(key, '->', value)
|
||||
"""
|
||||
|
||||
|
||||
objs = (TwoMASS(name=data[i]['2MASS'],
|
||||
ra=float(data[i]['RAJ2000']),
|
||||
dec=float(data[i]['DEJ2000']),
|
||||
jmag = notnan(data[i]['Jmag']),
|
||||
e_jmag = notnan(data[i]['e_Jmag']),
|
||||
hmag = notnan(data[i]['Hmag']),
|
||||
e_hmag = notnan(data[i]['e_Hmag']),
|
||||
kmag = notnan(data[i]['Kmag']),
|
||||
e_kmag = notnan(data[i]['e_Kmag']),
|
||||
qkfg = data[i]['Qflg'],
|
||||
rkfg = data[i]['Rflg'],
|
||||
bkfg = data[i]['Bflg'],
|
||||
ckfg = data[i]['Cflg'],
|
||||
prox = notnan(data[i]['prox']),
|
||||
xflg = boolean_notnan(data[i]['Xflg']),
|
||||
aflg = boolean_notnan(data[i]['Aflg']),)
|
||||
for i in range(len(data)))
|
||||
TwoMASS.objects.bulk_create(objs,batch_size)
|
||||
|
||||
print('--> Successfully loaded "%s"' % filename)
|
||||
pass
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = 'Initiates data dase'
|
||||
|
||||
# def add_arguments(self, parser):
|
||||
# parser.add_argument('poll_id', nargs='+', type=int)
|
||||
|
||||
def handle(self, *args, **options):
|
||||
|
||||
start_time = time.time()
|
||||
bulk_load_heasarc_table('/data/2MASS/l_0_180.tsv',reset=True)
|
||||
print("--- %s seconds ---" % (time.time() - start_time))
|
||||
|
||||
start_time = time.time()
|
||||
bulk_load_heasarc_table('/data/2MASS/l_180_360.tsv')
|
||||
print("--- %s seconds ---" % (time.time() - start_time))
|
||||
|
||||
self.stdout.write(self.style.SUCCESS('Done'))
|
@@ -0,0 +1,11 @@
|
||||
from django.core.management.base import BaseCommand, CommandError
|
||||
|
||||
from astrobasis.utils import astrobasis_assign_healpix
|
||||
from astrobasis.models import GLIMPSE
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = 'Initiates healpix for GLIMPSE'
|
||||
|
||||
def handle(self, *args, **options):
|
||||
astrobasis_assign_healpix(GLIMPSE)
|
||||
self.stdout.write(self.style.SUCCESS('Done'))
|
159
astrobasis/management/commands/00_astrobasis_glimpse_init.py
Normal file
159
astrobasis/management/commands/00_astrobasis_glimpse_init.py
Normal file
@@ -0,0 +1,159 @@
|
||||
from django.core.management.base import BaseCommand, CommandError
|
||||
import time
|
||||
from datetime import date
|
||||
from heasarc.models import INPUT_DATA_DIR
|
||||
import datetime
|
||||
from django.utils import timezone
|
||||
import astropy
|
||||
from astropy.io import ascii
|
||||
import pandas as pd
|
||||
import pymysql
|
||||
from sqlalchemy import create_engine
|
||||
import numpy.ma as ma
|
||||
from heasarc.tdat import tDat
|
||||
from heasarc.models import HeasarcTable, TableColumn, HeasarcObjectClass
|
||||
from heasarc.models import NSIDE_SOURCES, ORDER
|
||||
from astrobasis.models import GLIMPSE
|
||||
|
||||
from astropy_healpix import HEALPix
|
||||
from astropy.coordinates import SkyCoord # High-level coordinates
|
||||
from astropy.coordinates import ICRS, Galactic, FK4, FK5 # Low-level frames
|
||||
from astropy.coordinates import Angle, Latitude, Longitude # Angles
|
||||
import astropy.units as u
|
||||
|
||||
def bulk_load_heasarc_table(filename,reset=False):
|
||||
batch_size = 300
|
||||
|
||||
print("Delete all GLIMPSE")
|
||||
if(reset):
|
||||
tables = GLIMPSE.objects.all()
|
||||
tables.delete()
|
||||
|
||||
print("Loading {}".format(filename))
|
||||
data = astropy.table.Table.read(filename, format='ascii.csv',delimiter=';',comment='#',encoding='latin1')
|
||||
print(data.info)
|
||||
print("Bulk load to DB")
|
||||
|
||||
"""
|
||||
cols = data.columns
|
||||
for key, value in cols.items():
|
||||
print(key, '->', value)
|
||||
"""
|
||||
|
||||
start_time = time.time()
|
||||
|
||||
objs = (GLIMPSE(name=data[i]['GLIMPSE'],
|
||||
ra=float(data[i]['RAJ2000']),
|
||||
dec=float(data[i]['DEJ2000']),
|
||||
twomass = data[i]['2MASS'],
|
||||
jmag = data[i]['Jmag'],
|
||||
hmag = data[i]['Hmag'],
|
||||
kmag = data[i]['Kmag'],
|
||||
b1mag = data[i]['3.6mag'],
|
||||
e_b1mag = data[i]['e_3.6mag'],
|
||||
b2mag = data[i]['4.5mag'],
|
||||
e_b2mag = data[i]['e_4.5mag'],
|
||||
b3mag = data[i]['5.8mag'],
|
||||
e_b3mag = data[i]['e_5.8mag'],
|
||||
b4mag = data[i]['8.0mag'],
|
||||
e_b4mag = data[i]['e_8.0mag'],)
|
||||
for i in range(len(data)))
|
||||
GLIMPSE.objects.bulk_create(objs,batch_size)
|
||||
print("--- %s seconds ---" % (time.time() - start_time))
|
||||
|
||||
print('--> Successfully loaded "%s"' % filename)
|
||||
pass
|
||||
|
||||
def bulk_healpix_update_tooslow():
|
||||
glimpse_all = GLIMPSE.objects.all()
|
||||
hp = HEALPix(nside=NSIDE_SOURCES, order=ORDER, frame=FK5())
|
||||
objs = []
|
||||
start_time = time.time()
|
||||
for obj in glimpse_all:
|
||||
crd = SkyCoord(obj.ra, obj.dec, frame=FK5(), unit="deg")
|
||||
lon = crd.galactic.l.value
|
||||
lat = crd.galactic.b.value
|
||||
healpix = hp.skycoord_to_healpix(crd)
|
||||
obj.healpix = healpix
|
||||
obj.glon = lon
|
||||
obj.glat = lat
|
||||
objs.append(obj)
|
||||
GLIMPSE.objects.bulk_update(objs, ['healpix','glon','glat'], batch_size=1000)
|
||||
print("--- %s seconds ---" % (time.time() - start_time))
|
||||
|
||||
def load_heasarc_table(filename,reset=False):
|
||||
|
||||
if(reset):
|
||||
tables = GLIMPSE.objects.all()
|
||||
tables.delete()
|
||||
|
||||
return
|
||||
|
||||
data = astropy.table.Table.read(filename, format='ascii.csv',delimiter=';',comment='#',encoding='latin1')
|
||||
print(data.info)
|
||||
|
||||
"""
|
||||
cols = data.columns
|
||||
for key, value in cols.items():
|
||||
print(key, '->', value)
|
||||
"""
|
||||
|
||||
hp = HEALPix(nside=NSIDE_SOURCES, order=ORDER, frame=FK5())
|
||||
for item in data:
|
||||
|
||||
healpix = 0
|
||||
ra = 0.0
|
||||
dec = 0.0
|
||||
lon = 0.0
|
||||
lat = 0.0
|
||||
if not (ma.is_masked(item['RAJ2000']) or ma.is_masked(item['DEJ2000'])):
|
||||
ra = float(item['DEJ2000'])
|
||||
dec = float(item['DEJ2000'])
|
||||
crd = SkyCoord(ra, dec, frame=FK5(), unit="deg")
|
||||
lon = crd.galactic.l.value
|
||||
lat = crd.galactic.b.value
|
||||
healpix = hp.skycoord_to_healpix(crd)
|
||||
else:
|
||||
continue
|
||||
|
||||
|
||||
obj = GLIMPSE.objects.create(healpix=healpix,
|
||||
ra=ra,
|
||||
dec=dec,
|
||||
glon = lon,
|
||||
glat = lat,
|
||||
name=item['GLIMPSE'])
|
||||
twomass = item['2MASS']
|
||||
jmag = item['Jmag']
|
||||
hmag = item['Hmag']
|
||||
kmag = item['Kmag']
|
||||
b1mag = item['3.6mag']
|
||||
e_b1mag = item['e_3.6mag']
|
||||
b2mag = item['4.5mag']
|
||||
e_b2mag = item['e_4.5mag']
|
||||
b3mag = item['5.8mag']
|
||||
e_b3mag = item['e_5.8mag']
|
||||
b4mag = item['8.0mag']
|
||||
e_b4mag = item['e_8.0mag']
|
||||
obj.save()
|
||||
#C;GLIMPSE;2MASS;RAJ2000;DEJ2000;Jmag;Hmag;Kmag;3.6mag;e_3.6mag;4.5mag;e_4.5mag;5.8mag;e_5.8mag;8.0mag;e_8.0mag
|
||||
|
||||
print('--> Successfully loaded "%s"' % filename)
|
||||
pass
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = 'Initiates data dase'
|
||||
|
||||
# def add_arguments(self, parser):
|
||||
# parser.add_argument('poll_id', nargs='+', type=int)
|
||||
|
||||
def handle(self, *args, **options):
|
||||
|
||||
start_time = time.time()
|
||||
bulk_load_heasarc_table('/data/GLIMPSE/glimpse_spitzer.tsv',reset=True)
|
||||
print("--- %s seconds ---" % (time.time() - start_time))
|
||||
# Model.objects.filter(amount__isnull=True).update(amount=F('pre_tax') * 1.2)
|
||||
|
||||
|
||||
self.stdout.write(self.style.SUCCESS('Done'))
|
@@ -0,0 +1,76 @@
|
||||
from django.core.management.base import BaseCommand, CommandError
|
||||
from django.core.paginator import Paginator
|
||||
|
||||
from datetime import date
|
||||
from heasarc.models import INPUT_DATA_DIR
|
||||
import datetime
|
||||
from django.utils import timezone
|
||||
import astropy
|
||||
from astropy.io import ascii
|
||||
import pandas as pd
|
||||
import pymysql
|
||||
from sqlalchemy import create_engine
|
||||
import numpy.ma as ma
|
||||
|
||||
from astrobasis.models import VLASS
|
||||
|
||||
from astropy_healpix import HEALPix
|
||||
from astropy.coordinates import SkyCoord # High-level coordinates
|
||||
from astropy.coordinates import ICRS, Galactic, FK4, FK5 # Low-level frames
|
||||
from astropy.coordinates import Angle, Latitude, Longitude # Angles
|
||||
import astropy.units as u
|
||||
|
||||
from heasarc.models import NSIDE_SOURCES, ORDER
|
||||
|
||||
import os
|
||||
import glob
|
||||
import logging
|
||||
import time
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = 'Initiates healpix for Gaia'
|
||||
|
||||
def handle(self, *args, **options):
|
||||
start_time = time.time()
|
||||
hp = HEALPix(nside=NSIDE_SOURCES, order=ORDER, frame=FK5)
|
||||
|
||||
|
||||
#srcs = VLASS.objects.all().filter(healpix__gt=0)[:50]
|
||||
#for src in srcs:
|
||||
# crd = SkyCoord(src.ra, src.dec, frame="fk5", unit="deg")
|
||||
# heal = hp.skycoord_to_healpix(crd)
|
||||
# print(src.ra,src.dec,src.healpix,heal)
|
||||
#return
|
||||
|
||||
|
||||
srcs = VLASS.objects.all()#.filter(healpix__exact=0)
|
||||
paginator = Paginator(srcs, 50000)
|
||||
for page_idx in range(1, paginator.num_pages):
|
||||
start_time0 = time.time()
|
||||
ra=paginator.page(page_idx).object_list.values_list('ra', flat=True)
|
||||
dec=paginator.page(page_idx).object_list.values_list('dec', flat=True)
|
||||
crd = SkyCoord(ra, dec, frame="fk5", unit="deg")
|
||||
lon = crd.galactic.l.value
|
||||
lat = crd.galactic.b.value
|
||||
heal = hp.skycoord_to_healpix(crd)
|
||||
index=0
|
||||
updates=[]
|
||||
for src in paginator.page(page_idx).object_list:
|
||||
# here you can do what you want with the row
|
||||
#crd = SkyCoord(src.ra, src.dec, frame="fk5", unit="deg")
|
||||
#lon = crd.galactic.l.value
|
||||
#lat = crd.galactic.b.value
|
||||
#heal = hp.skycoord_to_healpix(crd)
|
||||
src.healpix=heal[index]
|
||||
src.glon=lon[index]
|
||||
src.glat=lat[index]
|
||||
#src.save()
|
||||
updates.append(src)
|
||||
#print(src.ra,src.dec,heal)
|
||||
index=index+1
|
||||
VLASS.objects.bulk_update(updates, ["healpix","glon","glat"], batch_size=200)
|
||||
elapsed = time.time() - start_time0
|
||||
estimated = (elapsed*(paginator.num_pages-page_idx))/60/60
|
||||
print("Page {}/{} for {:.2f} sec, est. {:.2f} hours".format(page_idx,paginator.num_pages,elapsed,estimated))
|
||||
|
||||
print("--- {:.2f} hours ---".format((time.time() - start_time)/60/60))
|
161
astrobasis/management/commands/00_astrobasis_vlass_init.py
Normal file
161
astrobasis/management/commands/00_astrobasis_vlass_init.py
Normal file
@@ -0,0 +1,161 @@
|
||||
from django.core.management.base import BaseCommand, CommandError
|
||||
import time
|
||||
from datetime import date
|
||||
from heasarc.models import INPUT_DATA_DIR
|
||||
import datetime
|
||||
from django.utils import timezone
|
||||
import astropy
|
||||
from astropy.io import ascii
|
||||
import pandas as pd
|
||||
import pymysql
|
||||
from sqlalchemy import create_engine
|
||||
import numpy.ma as ma
|
||||
from heasarc.tdat import tDat
|
||||
from heasarc.models import HeasarcTable, TableColumn, HeasarcObjectClass
|
||||
from heasarc.models import NSIDE_SOURCES, ORDER
|
||||
from astrobasis.models import VLASS
|
||||
|
||||
from astropy_healpix import HEALPix
|
||||
from astropy.coordinates import SkyCoord # High-level coordinates
|
||||
from astropy.coordinates import ICRS, Galactic, FK4, FK5 # Low-level frames
|
||||
from astropy.coordinates import Angle, Latitude, Longitude # Angles
|
||||
import astropy.units as u
|
||||
|
||||
def bulk_load_heasarc_table(filename,reset=False):
|
||||
batch_size = 500
|
||||
|
||||
print("Delete all VLASS")
|
||||
|
||||
if(reset):
|
||||
tables = VLASS.objects.all()
|
||||
tables.delete()
|
||||
|
||||
print("Loading {}".format(filename))
|
||||
data = astropy.table.Table.read(filename, format='ascii.csv',delimiter=';',comment='#',encoding='latin1')
|
||||
#print(data.info)
|
||||
|
||||
|
||||
|
||||
for col in data.columns:
|
||||
print("--> ",col)
|
||||
|
||||
|
||||
start_time = time.time()
|
||||
print("Bulk load to DB")
|
||||
|
||||
objs = (VLASS(name=data[i]['CompName'],
|
||||
glon=float(data[i]['_Glon']),
|
||||
glat=float(data[i]['_Glat']),
|
||||
ra_m=float(data[i]['RAMdeg']),
|
||||
dec_m=float(data[i]['DEMdeg']),
|
||||
ra=float(data[i]['RAJ2000']),
|
||||
e_ra=float(data[i]['e_RAJ2000']),
|
||||
dec=float(data[i]['DEJ2000']),
|
||||
e_dec=float(data[i]['e_DEJ2000']),
|
||||
ftot = data[i]['Ftot'],
|
||||
e_ftot = data[i]['e_Ftot'],
|
||||
fpeak = data[i]['Fpeak'],
|
||||
e_fpeak = data[i]['e_Fpeak'],
|
||||
dupflag = int(data[i]['DupFlag']),
|
||||
qualflag = int(data[i]['QualFlag']))
|
||||
for i in range(len(data)))
|
||||
VLASS.objects.bulk_create(objs,batch_size)
|
||||
print("--- %s seconds ---" % (time.time() - start_time))
|
||||
|
||||
print('--> Successfully loaded "%s"' % filename)
|
||||
pass
|
||||
|
||||
def bulk_healpix_update_tooslow():
|
||||
glimpse_all = GLIMPSE.objects.all()
|
||||
hp = HEALPix(nside=NSIDE_SOURCES, order=ORDER, frame=FK5())
|
||||
objs = []
|
||||
start_time = time.time()
|
||||
for obj in glimpse_all:
|
||||
crd = SkyCoord(obj.ra, obj.dec, frame=FK5(), unit="deg")
|
||||
lon = crd.galactic.l.value
|
||||
lat = crd.galactic.b.value
|
||||
healpix = hp.skycoord_to_healpix(crd)
|
||||
obj.healpix = healpix
|
||||
obj.glon = lon
|
||||
obj.glat = lat
|
||||
objs.append(obj)
|
||||
GLIMPSE.objects.bulk_update(objs, ['healpix','glon','glat'], batch_size=1000)
|
||||
print("--- %s seconds ---" % (time.time() - start_time))
|
||||
|
||||
def load_heasarc_table(filename,reset=False):
|
||||
|
||||
if(reset):
|
||||
tables = GLIMPSE.objects.all()
|
||||
tables.delete()
|
||||
|
||||
return
|
||||
|
||||
data = astropy.table.Table.read(filename, format='ascii.csv',delimiter=';',comment='#',encoding='latin1')
|
||||
print(data.info)
|
||||
|
||||
"""
|
||||
cols = data.columns
|
||||
for key, value in cols.items():
|
||||
print(key, '->', value)
|
||||
"""
|
||||
|
||||
hp = HEALPix(nside=NSIDE_SOURCES, order=ORDER, frame=FK5())
|
||||
for item in data:
|
||||
|
||||
healpix = 0
|
||||
ra = 0.0
|
||||
dec = 0.0
|
||||
lon = 0.0
|
||||
lat = 0.0
|
||||
if not (ma.is_masked(item['RAJ2000']) or ma.is_masked(item['DEJ2000'])):
|
||||
ra = float(item['DEJ2000'])
|
||||
dec = float(item['DEJ2000'])
|
||||
crd = SkyCoord(ra, dec, frame=FK5(), unit="deg")
|
||||
lon = crd.galactic.l.value
|
||||
lat = crd.galactic.b.value
|
||||
healpix = hp.skycoord_to_healpix(crd)
|
||||
else:
|
||||
continue
|
||||
|
||||
|
||||
obj = GLIMPSE.objects.create(healpix=healpix,
|
||||
ra=ra,
|
||||
dec=dec,
|
||||
glon = lon,
|
||||
glat = lat,
|
||||
name=item['GLIMPSE'])
|
||||
twomass = item['2MASS']
|
||||
jmag = item['Jmag']
|
||||
hmag = item['Hmag']
|
||||
kmag = item['Kmag']
|
||||
b1mag = item['3.6mag']
|
||||
e_b1mag = item['e_3.6mag']
|
||||
b2mag = item['4.5mag']
|
||||
e_b2mag = item['e_4.5mag']
|
||||
b3mag = item['5.8mag']
|
||||
e_b3mag = item['e_5.8mag']
|
||||
b4mag = item['8.0mag']
|
||||
e_b4mag = item['e_8.0mag']
|
||||
obj.save()
|
||||
#C;GLIMPSE;2MASS;RAJ2000;DEJ2000;Jmag;Hmag;Kmag;3.6mag;e_3.6mag;4.5mag;e_4.5mag;5.8mag;e_5.8mag;8.0mag;e_8.0mag
|
||||
|
||||
print('--> Successfully loaded "%s"' % filename)
|
||||
pass
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = 'Initiates data dase'
|
||||
|
||||
# def add_arguments(self, parser):
|
||||
# parser.add_argument('poll_id', nargs='+', type=int)
|
||||
|
||||
def handle(self, *args, **options):
|
||||
|
||||
start_time = time.time()
|
||||
bulk_load_heasarc_table('/data/VizieR/VLASS_radio.tsv',reset=True)
|
||||
#bulk_healpix_update_tooslow()
|
||||
print("--- %s seconds ---" % (time.time() - start_time))
|
||||
# Model.objects.filter(amount__isnull=True).update(amount=F('pre_tax') * 1.2)
|
||||
|
||||
|
||||
self.stdout.write(self.style.SUCCESS('Done'))
|
54
astrobasis/management/commands/00_init_gaia.py
Normal file
54
astrobasis/management/commands/00_init_gaia.py
Normal file
@@ -0,0 +1,54 @@
|
||||
from django.core.management.base import BaseCommand, CommandError
|
||||
|
||||
from datetime import date
|
||||
from heasarc.models import INPUT_DATA_DIR
|
||||
import datetime
|
||||
from django.utils import timezone
|
||||
import astropy
|
||||
from astropy.io import ascii
|
||||
import pandas as pd
|
||||
import pymysql
|
||||
from sqlalchemy import create_engine
|
||||
import numpy.ma as ma
|
||||
|
||||
from astrobasis.models import GaiaSourceFileDR3, GAIADR3
|
||||
|
||||
from astropy_healpix import HEALPix
|
||||
from astropy.coordinates import SkyCoord # High-level coordinates
|
||||
from astropy.coordinates import ICRS, Galactic, FK4, FK5 # Low-level frames
|
||||
from astropy.coordinates import Angle, Latitude, Longitude # Angles
|
||||
import astropy.units as u
|
||||
|
||||
|
||||
import os
|
||||
import glob
|
||||
import logging
|
||||
|
||||
def init_gaia(filepath):
|
||||
|
||||
filename_w_ext = os.path.basename(filepath)
|
||||
filename, file_extension = os.path.splitext(filename_w_ext)
|
||||
|
||||
gaia = GaiaSourceFileDR3(filename=filename)
|
||||
gaia.save()
|
||||
|
||||
# print('--> Successfully initiated "%s"' % filename)
|
||||
pass
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = 'Initiates data dase'
|
||||
|
||||
def handle(self, *args, **options):
|
||||
|
||||
gaia_all = GAIADR3.objects.all()
|
||||
gaia_all.delete()
|
||||
|
||||
files = []
|
||||
for file in glob.glob("/data/tmp/george/Gaia/gedr3/gaia_source/fits/fits/*.fits"):
|
||||
files.append(file)
|
||||
|
||||
for file in files:
|
||||
print(file)
|
||||
init_gaia(file)
|
||||
|
||||
self.stdout.write(self.style.SUCCESS('Done'))
|
179
astrobasis/management/commands/00_load_ztf_alerce.py
Normal file
179
astrobasis/management/commands/00_load_ztf_alerce.py
Normal file
@@ -0,0 +1,179 @@
|
||||
from django.core.management.base import BaseCommand, CommandError
|
||||
|
||||
import os
|
||||
import io
|
||||
import gzip
|
||||
import tarfile
|
||||
import warnings
|
||||
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
from avro.datafile import DataFileReader, DataFileWriter
|
||||
from avro.io import DatumReader, DatumWriter
|
||||
import fastavro
|
||||
|
||||
from astropy.time import Time
|
||||
from astropy.time import Time, TimezoneInfo
|
||||
from astropy.io import fits
|
||||
import astropy.units as u
|
||||
import aplpy
|
||||
|
||||
from astropy.time import Time
|
||||
from django.utils.timezone import localdate, localtime, now
|
||||
|
||||
from collections import defaultdict
|
||||
|
||||
import logging
|
||||
import requests
|
||||
import json
|
||||
import pprint
|
||||
|
||||
from astrobasis.models import ALeRCE
|
||||
from srglib.ztf import find_ztf_in_survey, load_ztf_alerce
|
||||
|
||||
from astropy.coordinates import SkyCoord # High-level coordinates
|
||||
from astropy.coordinates import ICRS, Galactic, FK4, FK5 # Low-level frames
|
||||
from astropy.coordinates import Angle, Latitude, Longitude # Angles
|
||||
import astropy.units as u
|
||||
import re
|
||||
import json
|
||||
import pandas as pd
|
||||
from astropy_healpix import HEALPix
|
||||
from erotrans.models import EroTransSource, EroTrans
|
||||
from erosurvey.models import NSIDE_PLATES, ORDER_PLATES
|
||||
from heasarc.models import NSIDE_SOURCES, ORDER
|
||||
from monthplan.models import Survey
|
||||
|
||||
def load_ztf_alerce_to_django_local(item):
|
||||
utc_moscow = TimezoneInfo(utc_offset=3*u.hour)
|
||||
hp = HEALPix(nside=NSIDE_SOURCES,
|
||||
order=ORDER, frame=FK5())
|
||||
|
||||
hp_plates = HEALPix(nside=NSIDE_PLATES,
|
||||
order=ORDER_PLATES, frame=FK5())
|
||||
|
||||
try:
|
||||
ztf = ALeRCE.objects.get(oid=item['oid'])
|
||||
print("ALeRCE ZTF alert %s is already loaded, skip" % item['oid'])
|
||||
return
|
||||
except ALeRCE.DoesNotExist:
|
||||
print("ALeRCE ZTF alert %s is not loaded" % item['oid'])
|
||||
pass
|
||||
|
||||
ra = float(item['meanra'])
|
||||
dec = float(item['meandec'])
|
||||
crd = SkyCoord(ra, dec, frame=FK5(), unit="deg")
|
||||
healpix = hp.skycoord_to_healpix(crd)
|
||||
healpix_plate = hp_plates.skycoord_to_healpix(crd)
|
||||
|
||||
first_tm = Time(item['firstmjd'], format='mjd', scale='utc')
|
||||
last_tm = Time(item['lastmjd'], format='mjd', scale='utc')
|
||||
first_dt = first_tm.to_datetime(timezone=utc_moscow)
|
||||
last_dt = last_tm.to_datetime(timezone=utc_moscow)
|
||||
|
||||
ztf = ALeRCE(
|
||||
healpix = healpix,
|
||||
healpix_plate = healpix_plate,
|
||||
classearly = item['classearly'],
|
||||
classrf = item['classrf'],
|
||||
oid = item['oid'],
|
||||
firstdate = first_dt,
|
||||
lastdate = last_dt,
|
||||
firstmjd = item['firstmjd'],
|
||||
lastmjd = item['lastmjd'],
|
||||
mean_magap_g = item['mean_magap_g'],
|
||||
mean_magap_r = item['mean_magap_r'],
|
||||
mean_magpsf_g = item['mean_magpsf_g'],
|
||||
mean_magpsf_r = item['mean_magpsf_r'],
|
||||
dec = dec,
|
||||
ra = ra,
|
||||
nobs = item['nobs'],
|
||||
pclassearly = item['pclassearly'],
|
||||
pclassrf = item['pclassrf'],
|
||||
sigma_magap_g = item['sigma_magap_g'],
|
||||
sigma_magap_r = item['sigma_magap_r'],
|
||||
sigma_magpsf_g = item['sigma_magpsf_g'],
|
||||
sigma_magpsf_r = item['sigma_magpsf_r'],
|
||||
sigmadec = item['sigmadec'],
|
||||
sigmara = item['sigmara'])
|
||||
|
||||
ztf.save()
|
||||
find_ztf_in_survey(ztf)
|
||||
|
||||
def load_ztf_alerce_local(days, extra=None):
|
||||
classrf = "sn ia"
|
||||
pclassrf = 0.1
|
||||
pclassearly = 0.1
|
||||
sortBy = "firstmjd"
|
||||
nobsmin = 2
|
||||
nobsmax = 40
|
||||
url = "https://ztf.alerce.online/query"
|
||||
|
||||
current_utc = now()
|
||||
current_mjd = Time(current_utc).mjd
|
||||
firstmjd_min = current_mjd - days
|
||||
|
||||
post={
|
||||
"sortBy": sortBy,
|
||||
"records_per_pages": 100,
|
||||
"query_parameters":{
|
||||
"filters": {
|
||||
"nobs": {
|
||||
"min": nobsmin,
|
||||
"max": nobsmax
|
||||
},
|
||||
#"classrf": classrf,
|
||||
#"pclassrf": pclassrf,
|
||||
'pclassearly':pclassearly,
|
||||
},
|
||||
"dates":{
|
||||
"firstmjd":{
|
||||
"min": firstmjd_min
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(extra):
|
||||
post['query_parameters']['filters'].update(extra)
|
||||
|
||||
#pprint.pprint(post)
|
||||
|
||||
r = requests.post(url = url, json = post)
|
||||
data = r.json()
|
||||
for item in data['result']:
|
||||
""" loads first page """
|
||||
packet=data['result'][item]
|
||||
#pprint.pprint(packet['oid'])
|
||||
load_ztf_alerce_to_django_local(packet)
|
||||
|
||||
total=int(data['total'])
|
||||
num_pages=int(data['num_pages'])
|
||||
page=int(data['page'])
|
||||
|
||||
print('total ',total,'num_pages ',num_pages,'page ', page)
|
||||
#return
|
||||
pages = list(range(2,num_pages+1))
|
||||
for page in pages:
|
||||
""" loads all other pages, staring from 2 """
|
||||
post.update( {'page':page,} )
|
||||
pprint.pprint(post)
|
||||
r = requests.post(url = url, json = post)
|
||||
data = r.json()
|
||||
for item in data['result']:
|
||||
packet=data['result'][item]
|
||||
#pprint.pprint(packet['oid'])
|
||||
load_ztf_alerce_to_django_local(packet)
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = 'Initiates data dase'
|
||||
|
||||
def handle(self, *args, **options):
|
||||
#all = ALeRCE.objects.all()
|
||||
#all.delete()
|
||||
|
||||
load_ztf_alerce_local(2)
|
||||
|
||||
print('Done')
|
256
astrobasis/management/commands/00_load_ztf_archive.py
Normal file
256
astrobasis/management/commands/00_load_ztf_archive.py
Normal file
@@ -0,0 +1,256 @@
|
||||
from django.core.management.base import BaseCommand, CommandError
|
||||
|
||||
import os
|
||||
import io
|
||||
import gzip
|
||||
import tarfile
|
||||
import warnings
|
||||
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
from avro.datafile import DataFileReader, DataFileWriter
|
||||
from avro.io import DatumReader, DatumWriter
|
||||
import fastavro
|
||||
|
||||
from astropy.time import Time
|
||||
from astropy.io import fits
|
||||
import astropy.units as u
|
||||
import aplpy
|
||||
|
||||
from collections import defaultdict
|
||||
|
||||
import logging
|
||||
import requests
|
||||
import json
|
||||
import pprint
|
||||
|
||||
from astrobasis.models import ZTFAlert
|
||||
from srglib.utils import find_ztf_in_survey
|
||||
|
||||
from astropy.coordinates import SkyCoord # High-level coordinates
|
||||
from astropy.coordinates import ICRS, Galactic, FK4, FK5 # Low-level frames
|
||||
from astropy.coordinates import Angle, Latitude, Longitude # Angles
|
||||
import astropy.units as u
|
||||
import re
|
||||
import json
|
||||
import pandas as pd
|
||||
from astropy_healpix import HEALPix
|
||||
from erotrans.models import EroTransSource, EroTrans
|
||||
from erosurvey.models import NSIDE_PLATES, ORDER_PLATES
|
||||
from heasarc.models import NSIDE_SOURCES, ORDER
|
||||
from monthplan.models import Survey
|
||||
|
||||
|
||||
"""
|
||||
https://zwickytransientfacility.github.io/ztf-avro-alert/filtering.html
|
||||
|
||||
Based on tests done at IPAC (F. Masci, priv. comm), the following filter delivers a relatively pure sample:
|
||||
|
||||
rb >= 0.65 and
|
||||
nbad = 0 and
|
||||
fwhm <= 5 and
|
||||
elong <= 1.2 and
|
||||
abs(magdiff) <= 0.1
|
||||
"""
|
||||
|
||||
def plot_lightcurve(dflc, ax=None, days_ago=True):
|
||||
|
||||
filter_color = {1:'green', 2:'red', 3:'pink'}
|
||||
if days_ago:
|
||||
now = Time.now().jd
|
||||
t = dflc.jd - now
|
||||
xlabel = 'Days Ago'
|
||||
else:
|
||||
t = dflc.jd
|
||||
xlabel = 'Time (JD)'
|
||||
|
||||
if ax is None:
|
||||
plt.figure()
|
||||
for fid, color in filter_color.items():
|
||||
# plot detections in this filter:
|
||||
w = (dflc.fid == fid) & ~dflc.magpsf.isnull()
|
||||
if np.sum(w):
|
||||
plt.errorbar(t[w],dflc.loc[w,'magpsf'], dflc.loc[w,'sigmapsf'],fmt='.',color=color)
|
||||
wnodet = (dflc.fid == fid) & dflc.magpsf.isnull()
|
||||
if np.sum(wnodet):
|
||||
plt.scatter(t[wnodet],dflc.loc[wnodet,'diffmaglim'], marker='v',color=color,alpha=0.25)
|
||||
|
||||
plt.gca().invert_yaxis()
|
||||
plt.xlabel(xlabel)
|
||||
plt.ylabel('Magnitude')
|
||||
plt.title(dflc.objectId)
|
||||
|
||||
def plot_cutout(stamp, fig=None, subplot=None, **kwargs):
|
||||
with gzip.open(io.BytesIO(stamp), 'rb') as f:
|
||||
with fits.open(io.BytesIO(f.read())) as hdul:
|
||||
if fig is None:
|
||||
fig = plt.figure(figsize=(4,4))
|
||||
if subplot is None:
|
||||
subplot = (1,1,1)
|
||||
ffig = aplpy.FITSFigure(hdul[0],figure=fig, subplot=subplot, **kwargs)
|
||||
ffig.show_grayscale(stretch='arcsinh')
|
||||
return ffig
|
||||
|
||||
def show_stamps(packet):
|
||||
#fig, axes = plt.subplots(1,3, figsize=(12,4))
|
||||
fig = plt.figure(figsize=(12,4))
|
||||
for i, cutout in enumerate(['Science','Template','Difference']):
|
||||
stamp = packet['cutout{}'.format(cutout)]['stampData']
|
||||
ffig = plot_cutout(stamp, fig=fig, subplot = (1,3,i+1))
|
||||
ffig.set_title(cutout)
|
||||
|
||||
def show_all(packet):
|
||||
fig = plt.figure(figsize=(16,4))
|
||||
dflc = make_dataframe(packet)
|
||||
plot_lightcurve(dflc,ax = plt.subplot(1,4,1))
|
||||
for i, cutout in enumerate(['Science','Template','Difference']):
|
||||
stamp = packet['cutout{}'.format(cutout)]['stampData']
|
||||
ffig = plot_cutout(stamp, fig=fig, subplot = (1,4,i+2))
|
||||
ffig.set_title(cutout)
|
||||
|
||||
def make_dataframe(packet):
|
||||
dfc = pd.DataFrame(packet['candidate'], index=[0])
|
||||
df_prv = pd.DataFrame(packet['prv_candidates'])
|
||||
dflc = pd.concat([dfc,df_prv], ignore_index=True, sort=False)
|
||||
# we'll attach some metadata--not this may not be preserved after all operations
|
||||
# https://stackoverflow.com/questions/14688306/adding-meta-information-metadata-to-pandas-dataframe
|
||||
dflc.objectId = packet['objectId']
|
||||
dflc.candid = packet['candid']
|
||||
return dflc
|
||||
|
||||
def is_alert_pure(packet):
|
||||
pure = True
|
||||
pure &= packet['candidate']['rb'] >= 0.65
|
||||
pure &= packet['candidate']['nbad'] == 0
|
||||
pure &= packet['candidate']['fwhm'] <= 5
|
||||
pure &= packet['candidate']['elong'] <= 1.2
|
||||
pure &= np.abs(packet['candidate']['magdiff']) <= 0.1
|
||||
return pure
|
||||
|
||||
def generate_dictionaries(root_dir):
|
||||
for fname in find_files(root_dir):
|
||||
for packet in open_avro(fname):
|
||||
yield packet
|
||||
|
||||
def open_avro(fname):
|
||||
with open(fname,'rb') as f:
|
||||
freader = fastavro.reader(f)
|
||||
# in principle there can be multiple packets per file
|
||||
for packet in freader:
|
||||
yield packet
|
||||
|
||||
def find_files(root_dir):
|
||||
for dir_name, subdir_list, file_list in os.walk(root_dir, followlinks=True):
|
||||
for fname in file_list:
|
||||
if fname.endswith('.avro'):
|
||||
yield dir_name+'/'+fname
|
||||
|
||||
def is_transient(dflc):
|
||||
|
||||
candidate = dflc.loc[0]
|
||||
|
||||
is_positive_sub = candidate['isdiffpos'] == 't'
|
||||
|
||||
if (candidate['distpsnr1'] is None) or (candidate['distpsnr1'] > 1.5):
|
||||
no_pointsource_counterpart = True
|
||||
else:
|
||||
if candidate['sgscore1'] < 0.5:
|
||||
no_pointsource_counterpart = True
|
||||
else:
|
||||
no_pointsource_counterpart = False
|
||||
|
||||
where_detected = (dflc['isdiffpos'] == 't') # nondetections will be None
|
||||
if np.sum(where_detected) >= 2:
|
||||
detection_times = dflc.loc[where_detected,'jd'].values
|
||||
dt = np.diff(detection_times)
|
||||
not_moving = np.max(dt) >= (30*u.minute).to(u.day).value
|
||||
else:
|
||||
not_moving = False
|
||||
|
||||
no_ssobject = (candidate['ssdistnr'] is None) or (candidate['ssdistnr'] < 0) or (candidate['ssdistnr'] > 5)
|
||||
|
||||
return is_positive_sub and no_pointsource_counterpart and not_moving and no_ssobject
|
||||
|
||||
def load_ztf_packet(item):
|
||||
hp = HEALPix(nside=NSIDE_SOURCES,
|
||||
order=ORDER, frame=FK5())
|
||||
|
||||
hp_plate = HEALPix(nside=NSIDE_PLATES,
|
||||
order=ORDER_PLATES,
|
||||
frame=FK5())
|
||||
|
||||
name = item['objectId']
|
||||
|
||||
|
||||
try:
|
||||
ztf = ZTFAlert.objects.get(objectId=name)
|
||||
print("ZTF alert ID %s is already loaded, skip" % name)
|
||||
return
|
||||
except ZTFAlert.DoesNotExist:
|
||||
print("ZTF alert ID %s is not loaded" % name)
|
||||
pass
|
||||
#date_string = item['candidate']['wall_time']
|
||||
#dt = datetime.strptime(date_string, format_string)
|
||||
ra = item['candidate']['ra']
|
||||
dec = item['candidate']['dec']
|
||||
crd = SkyCoord(ra, dec, frame=FK5(), unit="deg")
|
||||
healpix = hp.skycoord_to_healpix(crd)
|
||||
healpix_plate = hp_plate.skycoord_to_healpix(crd)
|
||||
ztf = ZTFAlert(
|
||||
objectId = item['objectId'],
|
||||
fid = item['candidate']['fid'],
|
||||
lco_id = item['candid'],
|
||||
healpix = healpix, healpix_plate = healpix_plate,
|
||||
ra = ra, dec = dec,
|
||||
programid = item['candidate']['programid'],
|
||||
magpsf = item['candidate']['magpsf'],
|
||||
sigmapsf = item['candidate']['sigmapsf'],
|
||||
magap = item['candidate']['magap'],
|
||||
magdiff = item['candidate']['magdiff'],
|
||||
nbad = item['candidate']['nbad'],
|
||||
fwhm = item['candidate']['fwhm'],
|
||||
elong = item['candidate']['elong'],
|
||||
sigmagap = item['candidate']['sigmagap'],
|
||||
#wall_time = datetime.strptime(date_string, format_string),
|
||||
diffmaglim = item['candidate']['diffmaglim'],
|
||||
#deltamagref = item['candidate']['deltamagref'],
|
||||
#deltamaglatest = item['candidate']['deltamaglatest'],
|
||||
rb = item['candidate']['rb'])
|
||||
ztf.save()
|
||||
|
||||
find_ztf_in_survey(ztf)
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = 'Initiates data dase'
|
||||
|
||||
def handle(self, *args, **options):
|
||||
|
||||
tar_archive = '/data/ZTF/ztf_public_20200126.tar.gz'
|
||||
|
||||
output_dir = tar_archive.split('/')[-1].split('.')[-3]
|
||||
|
||||
|
||||
#archive = tarfile.open(tar_archive,'r:gz')
|
||||
#archive.extractall(path=output_dir)
|
||||
#archive.close()
|
||||
|
||||
print (output_dir)
|
||||
print('{} has {} avro files'.format(output_dir, len(list(find_files(output_dir)))))
|
||||
|
||||
transient_alerts = []
|
||||
for packet in filter(is_alert_pure,generate_dictionaries(output_dir)):
|
||||
dflc = make_dataframe(packet)
|
||||
if is_transient(dflc):
|
||||
transient_alerts.append(packet)
|
||||
load_ztf_packet(packet)
|
||||
|
||||
|
||||
"""
|
||||
for packet in transient_alerts:
|
||||
with warnings.catch_warnings():
|
||||
warnings.simplefilter("ignore")
|
||||
show_all(packet)
|
||||
"""
|
65
astrobasis/management/commands/00_load_ztf_mars.py
Normal file
65
astrobasis/management/commands/00_load_ztf_mars.py
Normal file
@@ -0,0 +1,65 @@
|
||||
from django.core.management.base import BaseCommand, CommandError
|
||||
|
||||
from astropy.coordinates import SkyCoord # High-level coordinates
|
||||
from astropy.coordinates import ICRS, Galactic, FK4, FK5 # Low-level frames
|
||||
from astropy.coordinates import Angle, Latitude, Longitude # Angles
|
||||
import astropy.units as u
|
||||
import re
|
||||
import json
|
||||
import pandas as pd
|
||||
from astropy_healpix import HEALPix
|
||||
|
||||
import os
|
||||
import io
|
||||
import gzip
|
||||
import tarfile
|
||||
import warnings
|
||||
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
from avro.datafile import DataFileReader, DataFileWriter
|
||||
from avro.io import DatumReader, DatumWriter
|
||||
import fastavro
|
||||
|
||||
from astropy.time import Time
|
||||
from astropy.io import fits
|
||||
import astropy.units as u
|
||||
import aplpy
|
||||
|
||||
from astrobasis.models import ztf_filter
|
||||
|
||||
from collections import defaultdict
|
||||
|
||||
import logging
|
||||
import requests
|
||||
import json
|
||||
import pprint
|
||||
|
||||
from astrobasis.models import ZTFAlert
|
||||
from heasarc.models import NSIDE_SOURCES, ORDER, HeasarcBase
|
||||
from srglib.utils import load_ztf_alerts
|
||||
|
||||
"""
|
||||
https://zwickytransientfacility.github.io/ztf-avro-alert/filtering.html
|
||||
|
||||
Based on tests done at IPAC (F. Masci, priv. comm), the following filter delivers a relatively pure sample:
|
||||
|
||||
rb >= 0.65 and
|
||||
nbad = 0 and
|
||||
fwhm <= 5 and
|
||||
elong <= 1.2 and
|
||||
abs(magdiff) <= 0.1
|
||||
"""
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = 'Initiates data dase'
|
||||
|
||||
def handle(self, *args, **options):
|
||||
|
||||
|
||||
all = ZTFAlert.objects.all()
|
||||
all.delete()
|
||||
|
||||
#load_ztf_alerts()
|
52
astrobasis/management/commands/00_status_gaia.py
Normal file
52
astrobasis/management/commands/00_status_gaia.py
Normal file
@@ -0,0 +1,52 @@
|
||||
from django.core.management.base import BaseCommand, CommandError
|
||||
|
||||
from datetime import date
|
||||
from heasarc.models import INPUT_DATA_DIR
|
||||
import datetime
|
||||
from django.utils import timezone
|
||||
import astropy
|
||||
from astropy.io import ascii
|
||||
import pandas as pd
|
||||
import pymysql
|
||||
from sqlalchemy import create_engine
|
||||
import numpy.ma as ma
|
||||
|
||||
from astrobasis.models import GaiaSourceFileDR3, GAIADR3
|
||||
|
||||
from astropy_healpix import HEALPix
|
||||
from astropy.coordinates import SkyCoord # High-level coordinates
|
||||
from astropy.coordinates import ICRS, Galactic, FK4, FK5 # Low-level frames
|
||||
from astropy.coordinates import Angle, Latitude, Longitude # Angles
|
||||
import astropy.units as u
|
||||
|
||||
|
||||
import os
|
||||
import glob
|
||||
import logging
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = 'Initiates data dase'
|
||||
|
||||
def handle(self, *args, **options):
|
||||
|
||||
total_empty=GaiaSourceFileDR3.objects.filter(status__exact='empty').count()
|
||||
print("Empty %d" % total_empty)
|
||||
|
||||
total_ready=GaiaSourceFileDR3.objects.filter(status__exact='ready').count()
|
||||
print("Ready %d" % total_ready)
|
||||
|
||||
total_loaded=GaiaSourceFileDR3.objects.filter(status__exact='loaded').count()
|
||||
print("Loaded %d" % total_loaded)
|
||||
|
||||
total_healpix=GaiaSourceFileDR3.objects.filter(status__exact='healpix').count()
|
||||
print("Healpix %d" % total_healpix)
|
||||
|
||||
total=GaiaSourceFileDR3.objects.count()
|
||||
print("Total %d = %d" % (total, total_empty+total_loaded+total_healpix))
|
||||
|
||||
#total=GAIADR3.objects.count()
|
||||
#print("Total Gaia %d" % total)
|
||||
|
||||
return
|
||||
|
||||
|
39
astrobasis/management/commands/00_test_gaia.py
Normal file
39
astrobasis/management/commands/00_test_gaia.py
Normal file
@@ -0,0 +1,39 @@
|
||||
from django.core.management.base import BaseCommand, CommandError
|
||||
|
||||
from datetime import date
|
||||
from heasarc.models import INPUT_DATA_DIR
|
||||
import datetime
|
||||
from django.utils import timezone
|
||||
import astropy
|
||||
from astropy.io import ascii
|
||||
import pandas as pd
|
||||
import pymysql
|
||||
from sqlalchemy import create_engine
|
||||
import numpy.ma as ma
|
||||
|
||||
from astrobasis.models import GaiaSourceFile, GAIADR3
|
||||
|
||||
from astropy_healpix import HEALPix
|
||||
from astropy.coordinates import SkyCoord # High-level coordinates
|
||||
from astropy.coordinates import ICRS, Galactic, FK4, FK5 # Low-level frames
|
||||
from astropy.coordinates import Angle, Latitude, Longitude # Angles
|
||||
import astropy.units as u
|
||||
import time
|
||||
|
||||
|
||||
import os
|
||||
import glob
|
||||
import logging
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = 'Initiates data dase'
|
||||
|
||||
def handle(self, *args, **options):
|
||||
|
||||
start_time = time.time()
|
||||
srcs=GAIADR3.objects.filter(healpix=38837101).count()
|
||||
#for src in srcs:
|
||||
# print(src.name)
|
||||
print("Total Gaia found %d" % srcs)
|
||||
print("--- %s seconds ---" % (time.time() - start_time))
|
||||
|
221
astrobasis/management/commands/00_test_ztf.py
Normal file
221
astrobasis/management/commands/00_test_ztf.py
Normal file
@@ -0,0 +1,221 @@
|
||||
from django.core.management.base import BaseCommand, CommandError
|
||||
|
||||
import os
|
||||
import io
|
||||
import gzip
|
||||
import tarfile
|
||||
import warnings
|
||||
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
from avro.datafile import DataFileReader, DataFileWriter
|
||||
from avro.io import DatumReader, DatumWriter
|
||||
import fastavro
|
||||
|
||||
from astropy.time import Time
|
||||
from astropy.io import fits
|
||||
import astropy.units as u
|
||||
import aplpy
|
||||
|
||||
from collections import defaultdict
|
||||
|
||||
import requests
|
||||
import json
|
||||
import pprint
|
||||
|
||||
"""
|
||||
https://zwickytransientfacility.github.io/ztf-avro-alert/filtering.html
|
||||
|
||||
Based on tests done at IPAC (F. Masci, priv. comm), the following filter delivers a relatively pure sample:
|
||||
|
||||
rb >= 0.65 and
|
||||
nbad = 0 and
|
||||
fwhm <= 5 and
|
||||
elong <= 1.2 and
|
||||
abs(magdiff) <= 0.1
|
||||
"""
|
||||
|
||||
def plot_lightcurve(dflc, ax=None, days_ago=True):
|
||||
|
||||
filter_color = {1:'green', 2:'red', 3:'pink'}
|
||||
if days_ago:
|
||||
now = Time.now().jd
|
||||
t = dflc.jd - now
|
||||
xlabel = 'Days Ago'
|
||||
else:
|
||||
t = dflc.jd
|
||||
xlabel = 'Time (JD)'
|
||||
|
||||
if ax is None:
|
||||
plt.figure()
|
||||
for fid, color in filter_color.items():
|
||||
# plot detections in this filter:
|
||||
w = (dflc.fid == fid) & ~dflc.magpsf.isnull()
|
||||
if np.sum(w):
|
||||
plt.errorbar(t[w],dflc.loc[w,'magpsf'], dflc.loc[w,'sigmapsf'],fmt='.',color=color)
|
||||
wnodet = (dflc.fid == fid) & dflc.magpsf.isnull()
|
||||
if np.sum(wnodet):
|
||||
plt.scatter(t[wnodet],dflc.loc[wnodet,'diffmaglim'], marker='v',color=color,alpha=0.25)
|
||||
|
||||
plt.gca().invert_yaxis()
|
||||
plt.xlabel(xlabel)
|
||||
plt.ylabel('Magnitude')
|
||||
plt.title(dflc.objectId)
|
||||
|
||||
def plot_cutout(stamp, fig=None, subplot=None, **kwargs):
|
||||
with gzip.open(io.BytesIO(stamp), 'rb') as f:
|
||||
with fits.open(io.BytesIO(f.read())) as hdul:
|
||||
if fig is None:
|
||||
fig = plt.figure(figsize=(4,4))
|
||||
if subplot is None:
|
||||
subplot = (1,1,1)
|
||||
ffig = aplpy.FITSFigure(hdul[0],figure=fig, subplot=subplot, **kwargs)
|
||||
ffig.show_grayscale(stretch='arcsinh')
|
||||
return ffig
|
||||
|
||||
def show_stamps(packet):
|
||||
#fig, axes = plt.subplots(1,3, figsize=(12,4))
|
||||
fig = plt.figure(figsize=(12,4))
|
||||
for i, cutout in enumerate(['Science','Template','Difference']):
|
||||
stamp = packet['cutout{}'.format(cutout)]['stampData']
|
||||
ffig = plot_cutout(stamp, fig=fig, subplot = (1,3,i+1))
|
||||
ffig.set_title(cutout)
|
||||
|
||||
def show_all(packet):
|
||||
fig = plt.figure(figsize=(16,4))
|
||||
dflc = make_dataframe(packet)
|
||||
plot_lightcurve(dflc,ax = plt.subplot(1,4,1))
|
||||
for i, cutout in enumerate(['Science','Template','Difference']):
|
||||
stamp = packet['cutout{}'.format(cutout)]['stampData']
|
||||
ffig = plot_cutout(stamp, fig=fig, subplot = (1,4,i+2))
|
||||
ffig.set_title(cutout)
|
||||
|
||||
def make_dataframe(packet):
|
||||
dfc = pd.DataFrame(packet['candidate'], index=[0])
|
||||
df_prv = pd.DataFrame(packet['prv_candidates'])
|
||||
dflc = pd.concat([dfc,df_prv], ignore_index=True, sort=False)
|
||||
# we'll attach some metadata--not this may not be preserved after all operations
|
||||
# https://stackoverflow.com/questions/14688306/adding-meta-information-metadata-to-pandas-dataframe
|
||||
dflc.objectId = packet['objectId']
|
||||
dflc.candid = packet['candid']
|
||||
return dflc
|
||||
|
||||
def is_alert_pure(packet):
|
||||
pure = True
|
||||
pure &= packet['candidate']['rb'] >= 0.65
|
||||
pure &= packet['candidate']['nbad'] == 0
|
||||
pure &= packet['candidate']['fwhm'] <= 5
|
||||
pure &= packet['candidate']['elong'] <= 1.2
|
||||
pure &= np.abs(packet['candidate']['magdiff']) <= 0.1
|
||||
return pure
|
||||
|
||||
def generate_dictionaries(root_dir):
|
||||
for fname in find_files(root_dir):
|
||||
for packet in open_avro(fname):
|
||||
yield packet
|
||||
|
||||
def open_avro(fname):
|
||||
with open(fname,'rb') as f:
|
||||
freader = fastavro.reader(f)
|
||||
# in principle there can be multiple packets per file
|
||||
for packet in freader:
|
||||
yield packet
|
||||
|
||||
def find_files(root_dir):
|
||||
for dir_name, subdir_list, file_list in os.walk(root_dir, followlinks=True):
|
||||
for fname in file_list:
|
||||
if fname.endswith('.avro'):
|
||||
yield dir_name+'/'+fname
|
||||
|
||||
def is_transient(dflc):
|
||||
|
||||
candidate = dflc.loc[0]
|
||||
|
||||
is_positive_sub = candidate['isdiffpos'] == 't'
|
||||
|
||||
if (candidate['distpsnr1'] is None) or (candidate['distpsnr1'] > 1.5):
|
||||
no_pointsource_counterpart = True
|
||||
else:
|
||||
if candidate['sgscore1'] < 0.5:
|
||||
no_pointsource_counterpart = True
|
||||
else:
|
||||
no_pointsource_counterpart = False
|
||||
|
||||
where_detected = (dflc['isdiffpos'] == 't') # nondetections will be None
|
||||
if np.sum(where_detected) >= 2:
|
||||
detection_times = dflc.loc[where_detected,'jd'].values
|
||||
dt = np.diff(detection_times)
|
||||
not_moving = np.max(dt) >= (30*u.minute).to(u.day).value
|
||||
else:
|
||||
not_moving = False
|
||||
|
||||
no_ssobject = (candidate['ssdistnr'] is None) or (candidate['ssdistnr'] < 0) or (candidate['ssdistnr'] > 5)
|
||||
|
||||
return is_positive_sub and no_pointsource_counterpart and not_moving and no_ssobject
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = 'Initiates data dase'
|
||||
|
||||
def handle(self, *args, **options):
|
||||
|
||||
query_86400='https://mars.lco.global/?format=json&sort_value=jd&sort_order=desc&objectId=&candid=&time__gt=&time__lt=&time__since=86400&jd__gt=&jd__lt=&filter=&cone=&objectcone=&objectidps=&ra__gt=&ra__lt=&dec__gt=&dec__lt=&l__gt=&l__lt=&b__gt=&b__lt=&magpsf__gte=&magpsf__lte=&sigmapsf__lte=&magap__gte=&magap__lte=&distnr__gte=&distnr__lte=&deltamaglatest__gte=&deltamaglatest__lte=&deltamagref__gte=&deltamagref__lte=&elong__lte=&nbad__lte=&rb__gte=&drb__gte=&classtar__gte=&classtar__lte=&fwhm__lte='
|
||||
|
||||
URL = "https://mars.lco.global/"
|
||||
|
||||
# defining a params dict for the parameters to be sent to the API
|
||||
#data = {"queries": [{"time_since": 100,},]}
|
||||
|
||||
PARAMS={'format':'json', 'time__since':86400}
|
||||
|
||||
# sending get request and saving the response as response object
|
||||
r = requests.get(url = URL, params = PARAMS)
|
||||
|
||||
|
||||
# extracting data in json format
|
||||
data = r.json()
|
||||
for d in data:
|
||||
print(d)
|
||||
|
||||
|
||||
#pprint.pprint(data['results'])
|
||||
|
||||
for item in data['results']:
|
||||
print(item['lco_id'],item['objectId'],item['candidate']['wall_time'])
|
||||
|
||||
return
|
||||
|
||||
tar_archive = '/export/django/srg/data/ZTF/ztf_public_20200125.tar.gz'
|
||||
output_dir = tar_archive.split('/')[-1].split('.')[-3]
|
||||
print (output_dir)
|
||||
|
||||
print('{} has {} avro files'.format(output_dir, len(list(find_files(output_dir)))))
|
||||
|
||||
|
||||
#archive = tarfile.open(tar_archive,'r:gz')
|
||||
#archive.extractall(path=output_dir)
|
||||
#archive.close()
|
||||
|
||||
programs = defaultdict(int)
|
||||
#for packet in generate_dictionaries(output_dir):
|
||||
# programs[packet['candidate']['programid']] += 1
|
||||
#print(programs)
|
||||
|
||||
for packet in filter(is_alert_pure,generate_dictionaries(output_dir)):
|
||||
programs[packet['candidate']['programid']] += 1
|
||||
print(programs)
|
||||
|
||||
transient_alerts = []
|
||||
for packet in filter(is_alert_pure,generate_dictionaries(output_dir)):
|
||||
dflc = make_dataframe(packet)
|
||||
if is_transient(dflc):
|
||||
print(packet['objectId'],packet['candidate']['ra'],packet['candidate']['dec'])
|
||||
transient_alerts.append(packet)
|
||||
|
||||
"""
|
||||
for packet in transient_alerts:
|
||||
with warnings.catch_warnings():
|
||||
warnings.simplefilter("ignore")
|
||||
show_all(packet)
|
||||
"""
|
71
astrobasis/management/commands/01_load_gaia.py
Normal file
71
astrobasis/management/commands/01_load_gaia.py
Normal file
@@ -0,0 +1,71 @@
|
||||
from django.core.management.base import BaseCommand, CommandError
|
||||
|
||||
from datetime import date
|
||||
from heasarc.models import INPUT_DATA_DIR
|
||||
import datetime
|
||||
from django.utils import timezone
|
||||
import astropy
|
||||
from astropy.io import ascii
|
||||
import pandas as pd
|
||||
import pymysql
|
||||
from sqlalchemy import create_engine
|
||||
import numpy.ma as ma
|
||||
|
||||
from astrobasis.models import GaiaSourceFile, GAIADR2
|
||||
|
||||
from astropy_healpix import HEALPix
|
||||
from astropy.coordinates import SkyCoord # High-level coordinates
|
||||
from astropy.coordinates import ICRS, Galactic, FK4, FK5 # Low-level frames
|
||||
from astropy.coordinates import Angle, Latitude, Longitude # Angles
|
||||
import astropy.units as u
|
||||
|
||||
import os
|
||||
import glob
|
||||
import logging
|
||||
|
||||
def load_gaia_bulk():
|
||||
|
||||
path='/data/Gaia/gaia_source/csv/'
|
||||
batch_size = 500
|
||||
gaia_empty=GaiaSourceFile.objects.filter(status__exact='empty')
|
||||
for gaia in gaia_empty:
|
||||
srcs = gaia.gaiadr2_set.all()
|
||||
if(srcs):
|
||||
srcs.delete()
|
||||
print("Clear ",gaia.filename," back ref: ",len(srcs))
|
||||
|
||||
filepath=path+gaia.filename+'.gz'
|
||||
data = astropy.table.Table.read(filepath, format='ascii.csv',encoding='latin1')
|
||||
gaia.nrows = len(data)
|
||||
gaia.save()
|
||||
print("Bulk create for %s" % gaia.filename)
|
||||
objs = (GAIADR2(filename=gaia,
|
||||
ra=data[i]['ra'],
|
||||
dec=data[i]['dec'],
|
||||
name=data[i]['designation'],
|
||||
solution_id = data[i]['solution_id'],
|
||||
source_id = data[i]['source_id'],
|
||||
ref_epoch = data[i]['ref_epoch'],
|
||||
ra_error = data[i]['ra_error'],
|
||||
dec_error = data[i]['dec_error'],
|
||||
parallax = data[i]['parallax'],
|
||||
parallax_error = data[i]['parallax_error'],
|
||||
pmra = data[i]['pmra'],
|
||||
pmra_error = data[i]['pmra_error'],
|
||||
pmdec = data[i]['pmdec'],
|
||||
pmdec_error = data[i]['pmdec_error'],
|
||||
phot_g_mean_mag = data[i]['phot_g_mean_mag'],
|
||||
phot_bp_mean_mag = data[i]['phot_bp_mean_mag'],
|
||||
phot_rp_mean_mag = data[i]['phot_rp_mean_mag'],)
|
||||
for i in range(len(data)))
|
||||
|
||||
GAIADR2.objects.bulk_create(objs,batch_size)
|
||||
|
||||
pass
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = 'Initiates data dase'
|
||||
|
||||
def handle(self, *args, **options):
|
||||
load_gaia_bulk()
|
||||
|
79
astrobasis/management/commands/01_load_gaia_dr3.py
Normal file
79
astrobasis/management/commands/01_load_gaia_dr3.py
Normal file
@@ -0,0 +1,79 @@
|
||||
from django.core.management.base import BaseCommand, CommandError
|
||||
|
||||
from datetime import date
|
||||
from heasarc.models import INPUT_DATA_DIR
|
||||
import datetime
|
||||
from django.utils import timezone
|
||||
import astropy
|
||||
from astropy.io import ascii
|
||||
import pandas as pd
|
||||
import pymysql
|
||||
from sqlalchemy import create_engine
|
||||
import numpy.ma as ma
|
||||
import time
|
||||
|
||||
from astrobasis.models import GaiaSourceFileDR3, GAIADR3
|
||||
|
||||
from astropy_healpix import HEALPix
|
||||
from astropy.coordinates import SkyCoord # High-level coordinates
|
||||
from astropy.coordinates import ICRS, Galactic, FK4, FK5 # Low-level frames
|
||||
from astropy.coordinates import Angle, Latitude, Longitude # Angles
|
||||
import astropy.units as u
|
||||
|
||||
import os
|
||||
import glob
|
||||
import logging
|
||||
|
||||
def load_gaia_bulk():
|
||||
start_time = time.time()
|
||||
path='/data/tmp/george/Gaia/gedr3/gaia_source/fits/fits/'
|
||||
batch_size = 500
|
||||
gaia_empty=GaiaSourceFileDR3.objects.filter(status__exact='empty')
|
||||
|
||||
for gaia in gaia_empty:
|
||||
srcs = gaia.gaiadr3_set.all()
|
||||
if(srcs):
|
||||
srcs.delete()
|
||||
print("Clear ",gaia.filename," back ref: ",len(srcs))
|
||||
|
||||
filepath=path+gaia.filename+'.fits'
|
||||
data = astropy.table.Table.read(filepath, format='fits')
|
||||
|
||||
|
||||
gaia.nrows = len(data)
|
||||
gaia.save()
|
||||
print("Bulk create for %s" % gaia.filename)
|
||||
objs = (GAIADR3(filename=gaia,
|
||||
ra=data[i]['ra'],
|
||||
dec=data[i]['dec'],
|
||||
name=data[i]['designation'],
|
||||
#solution_id = data[i]['solution_id'],
|
||||
source_id = data[i]['source_id'],
|
||||
#ref_epoch = data[i]['ref_epoch'],
|
||||
ra_error = data[i]['ra_error'],
|
||||
dec_error = data[i]['dec_error'],
|
||||
parallax = data[i]['parallax'],
|
||||
parallax_error = data[i]['parallax_error'],
|
||||
pmra = data[i]['pmra'],
|
||||
pmra_error = data[i]['pmra_error'],
|
||||
pmdec = data[i]['pmdec'],
|
||||
pmdec_error = data[i]['pmdec_error'],
|
||||
phot_g_mean_mag = data[i]['phot_g_mean_mag'],
|
||||
phot_bp_mean_mag = data[i]['phot_bp_mean_mag'],
|
||||
phot_rp_mean_mag = data[i]['phot_rp_mean_mag'],)
|
||||
for i in range(len(data)))
|
||||
|
||||
GAIADR3.objects.bulk_create(objs,batch_size)
|
||||
gaia.status="ready"
|
||||
gaia.save()
|
||||
|
||||
|
||||
print("--- %s seconds ---" % (time.time() - start_time))
|
||||
pass
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = 'Initiates data dase'
|
||||
|
||||
def handle(self, *args, **options):
|
||||
load_gaia_bulk()
|
||||
|
52
astrobasis/management/commands/02_delete_gaia.py
Normal file
52
astrobasis/management/commands/02_delete_gaia.py
Normal file
@@ -0,0 +1,52 @@
|
||||
from django.core.management.base import BaseCommand, CommandError
|
||||
|
||||
from datetime import date
|
||||
from heasarc.models import INPUT_DATA_DIR
|
||||
import datetime
|
||||
from django.utils import timezone
|
||||
import astropy
|
||||
from astropy.io import ascii
|
||||
import pandas as pd
|
||||
import pymysql
|
||||
from sqlalchemy import create_engine
|
||||
import numpy.ma as ma
|
||||
|
||||
from astrobasis.models import GaiaSourceFile, GAIADR2
|
||||
|
||||
from astropy_healpix import HEALPix
|
||||
from astropy.coordinates import SkyCoord # High-level coordinates
|
||||
from astropy.coordinates import ICRS, Galactic, FK4, FK5 # Low-level frames
|
||||
from astropy.coordinates import Angle, Latitude, Longitude # Angles
|
||||
import astropy.units as u
|
||||
|
||||
|
||||
import os
|
||||
import glob
|
||||
import logging
|
||||
|
||||
def delete_gaia():
|
||||
|
||||
gaia_loaded = GaiaSourceFile.objects.all() #filter(status__exact='loaded')
|
||||
total_loaded = gaia_loaded.count()
|
||||
total = 0
|
||||
for gaia in gaia_loaded:
|
||||
total_linked = gaia.gaiadr2_set.all().count()
|
||||
print("%s %s linked: %d nrows: %d" % (gaia.filename, gaia.status,total_linked,gaia.nrows))
|
||||
|
||||
linked = gaia.gaiadr2_set.all()
|
||||
linked.delete()
|
||||
gaia.status='empty'
|
||||
gaia.save()
|
||||
total+=1
|
||||
|
||||
print("Total %d removed from %d" % (total, total_loaded,))
|
||||
pass
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = 'Initiates data dase'
|
||||
|
||||
def handle(self, *args, **options):
|
||||
delete_gaia()
|
||||
|
||||
|
||||
|
65
astrobasis/management/commands/02_mark_gaia.py
Normal file
65
astrobasis/management/commands/02_mark_gaia.py
Normal file
@@ -0,0 +1,65 @@
|
||||
from django.core.management.base import BaseCommand, CommandError
|
||||
|
||||
from datetime import date
|
||||
from heasarc.models import INPUT_DATA_DIR
|
||||
import datetime
|
||||
from django.utils import timezone
|
||||
import astropy
|
||||
from astropy.io import ascii
|
||||
import pandas as pd
|
||||
import pymysql
|
||||
from sqlalchemy import create_engine
|
||||
import numpy.ma as ma
|
||||
|
||||
from astrobasis.models import GaiaSourceFile, GAIADR2
|
||||
|
||||
from astropy_healpix import HEALPix
|
||||
from astropy.coordinates import SkyCoord # High-level coordinates
|
||||
from astropy.coordinates import ICRS, Galactic, FK4, FK5 # Low-level frames
|
||||
from astropy.coordinates import Angle, Latitude, Longitude # Angles
|
||||
import astropy.units as u
|
||||
|
||||
|
||||
import os
|
||||
import glob
|
||||
import logging
|
||||
|
||||
def mark_gaia():
|
||||
|
||||
gaia_empty = GaiaSourceFile.objects.filter(status__exact='empty')
|
||||
total_empty = gaia_empty.count()
|
||||
total = 0
|
||||
for gaia in gaia_empty:
|
||||
total_linked = gaia.gaiadr2_set.all().count()
|
||||
#print("%s %s linked: %d nrows: %d" % (gaia.filename, gaia.status,total_linked,gaia.nrows))
|
||||
|
||||
if (gaia.nrows == 0):
|
||||
""" empty and not still started to load """
|
||||
continue
|
||||
|
||||
if (total_linked == 0):
|
||||
""" looks like currently loading """
|
||||
continue
|
||||
|
||||
if (total_linked == gaia.nrows):
|
||||
print(gaia.filename+" -- loaded")
|
||||
gaia.status='loaded'
|
||||
gaia.save()
|
||||
total+=1
|
||||
else:
|
||||
""" delete leftovers if any """
|
||||
#linked = gaia.gaiadr2_set.all()
|
||||
#linked.delete()
|
||||
print(gaia.filename+" "+str(total_linked)+" != "+str(gaia.nrows))
|
||||
|
||||
print("Total %d marked as loaded from %d empty selected" % (total, total_empty,))
|
||||
pass
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = 'Initiates data dase'
|
||||
|
||||
def handle(self, *args, **options):
|
||||
mark_gaia()
|
||||
|
||||
|
||||
|
108
astrobasis/management/commands/03_healpix_gaia.py
Normal file
108
astrobasis/management/commands/03_healpix_gaia.py
Normal file
@@ -0,0 +1,108 @@
|
||||
from django.core.management.base import BaseCommand, CommandError
|
||||
|
||||
from datetime import date
|
||||
from heasarc.models import INPUT_DATA_DIR
|
||||
import datetime
|
||||
from django.utils import timezone
|
||||
import astropy
|
||||
from astropy.io import ascii
|
||||
import pandas as pd
|
||||
import pymysql
|
||||
from sqlalchemy import create_engine
|
||||
import numpy.ma as ma
|
||||
|
||||
from astrobasis.models import GaiaSourceFileDR3, GAIADR3
|
||||
|
||||
from astropy_healpix import HEALPix
|
||||
from astropy.coordinates import SkyCoord # High-level coordinates
|
||||
from astropy.coordinates import ICRS, Galactic, FK4, FK5 # Low-level frames
|
||||
from astropy.coordinates import Angle, Latitude, Longitude # Angles
|
||||
import astropy.units as u
|
||||
|
||||
from heasarc.models import NSIDE_SOURCES, ORDER
|
||||
|
||||
import os
|
||||
import glob
|
||||
import logging
|
||||
import time
|
||||
|
||||
from multiprocessing import Pool, cpu_count
|
||||
|
||||
|
||||
USE_NCORES=1
|
||||
|
||||
def myfunc(n):
|
||||
print(n)
|
||||
|
||||
batch_size=500
|
||||
hp = HEALPix(nside=NSIDE_SOURCES, order=ORDER, frame=FK5)
|
||||
|
||||
plates=GaiaSourceFileDR3.objects.filter(status__exact="ready")
|
||||
|
||||
total_ready = len(plates)
|
||||
print('Total <ready> Gaia files: '+str(total_ready))
|
||||
|
||||
step=int(total_ready/USE_NCORES)+1
|
||||
idx1 = step*n
|
||||
idx2 = step*(n+1)
|
||||
if idx2 > total_ready:
|
||||
idx2=total_ready
|
||||
for i in range(idx1,idx2):
|
||||
print(str(n)+": "+plates[i].filename)
|
||||
phots=plates[i].gaiadr3_set.exclude(healpix__gt=0.0)
|
||||
ra=phots.values_list('ra', flat=True)
|
||||
dec=phots.values_list('dec', flat=True)
|
||||
crd = SkyCoord(ra, dec, frame="fk5", unit="deg")
|
||||
heal = hp.skycoord_to_healpix(crd)
|
||||
for j, phot in enumerate(phots):
|
||||
phot.healpix=heal[j]
|
||||
GAIADR3.objects.bulk_update(phots, ['healpix'], batch_size=batch_size)
|
||||
|
||||
plates[i].status='healpix'
|
||||
plates[i].save()
|
||||
|
||||
pass
|
||||
|
||||
def run_healpix():
|
||||
|
||||
start_time = time.time()
|
||||
|
||||
batch_size=500
|
||||
hp = HEALPix(nside=NSIDE_SOURCES, order=ORDER, frame=FK5)
|
||||
|
||||
plates=GaiaSourceFileDR3.objects.filter(status__exact="ready")
|
||||
|
||||
total_ready = len(plates)
|
||||
|
||||
print('Total <ready> Gaia files: '+str(total_ready))
|
||||
|
||||
for plate in plates:
|
||||
print(plate.filename)
|
||||
phots=plate.gaiadr3_set.exclude(healpix__gt=0.0)
|
||||
ra=phots.values_list('ra', flat=True)
|
||||
dec=phots.values_list('dec', flat=True)
|
||||
crd = SkyCoord(ra, dec, frame="fk5", unit="deg")
|
||||
heal = hp.skycoord_to_healpix(crd)
|
||||
for j, phot in enumerate(phots):
|
||||
phot.healpix=heal[j]
|
||||
GAIADR3.objects.bulk_update(phots, ['healpix'], batch_size=batch_size)
|
||||
|
||||
plate.status='healpix'
|
||||
plate.save()
|
||||
|
||||
print("--- %s seconds ---" % (time.time() - start_time))
|
||||
pass
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = 'Initiates healpix for Gaia'
|
||||
|
||||
def handle(self, *args, **options):
|
||||
|
||||
run_healpix()
|
||||
|
||||
"""
|
||||
does not work for multitheading for some reason
|
||||
|
||||
with Pool(10) as p:
|
||||
p.map(myfunc, range(USE_NCORES))
|
||||
"""
|
15
astrobasis/management/commands/show_celery.py
Normal file
15
astrobasis/management/commands/show_celery.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from django.core.management.base import BaseCommand, CommandError
|
||||
from celery.task.control import inspect
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = 'Initiates data dase'
|
||||
|
||||
def handle(self, *args, **options):
|
||||
i = inspect()
|
||||
|
||||
print('Show the items that have an ETA or are scheduled for later processing')
|
||||
print(i.scheduled())
|
||||
print('Show tasks that are currently active.')
|
||||
print(i.active())
|
||||
print('Show tasks that have been claimed by workers')
|
||||
print(i.reserved())
|
49
astrobasis/migrations/0001_initial.py
Normal file
49
astrobasis/migrations/0001_initial.py
Normal file
@@ -0,0 +1,49 @@
|
||||
# Generated by Django 2.2.6 on 2020-01-21 15:05
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='GaiaSourceFile',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('filename', models.CharField(blank=True, default='', max_length=80)),
|
||||
('status', models.CharField(default='empty', max_length=7)),
|
||||
('nrows', models.IntegerField(default=0)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='GAIADR2',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('healpix', models.BigIntegerField(db_index=True, default=0)),
|
||||
('solution_id', models.CharField(blank=True, default='', max_length=19)),
|
||||
('name', models.CharField(blank=True, default='', max_length=30)),
|
||||
('source_id', models.CharField(blank=True, default='', max_length=19)),
|
||||
('ref_epoch', models.FloatField(default=0.0)),
|
||||
('ra', models.FloatField(default=0.0)),
|
||||
('ra_error', models.FloatField(default=0.0)),
|
||||
('dec', models.FloatField(default=0.0)),
|
||||
('dec_error', models.FloatField(default=0.0)),
|
||||
('parallax', models.FloatField(default=0.0)),
|
||||
('parallax_error', models.FloatField(default=0.0)),
|
||||
('pmra', models.FloatField(default=0.0)),
|
||||
('pmra_error', models.FloatField(default=0.0)),
|
||||
('pmdec', models.FloatField(default=0.0)),
|
||||
('pmdec_error', models.FloatField(default=0.0)),
|
||||
('phot_g_mean_mag', models.FloatField(default=0.0)),
|
||||
('phot_bp_mean_mag', models.FloatField(default=0.0)),
|
||||
('phot_rp_mean_mag', models.FloatField(default=0.0)),
|
||||
('filename', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='astrobasis.GaiaSourceFile')),
|
||||
],
|
||||
),
|
||||
]
|
35
astrobasis/migrations/0002_ztfalert.py
Normal file
35
astrobasis/migrations/0002_ztfalert.py
Normal file
@@ -0,0 +1,35 @@
|
||||
# Generated by Django 2.2.6 on 2020-01-28 18:01
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='ZTFAlert',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('objectId', models.CharField(blank=True, default='', max_length=12)),
|
||||
('fid', models.IntegerField(db_index=True, default=0)),
|
||||
('lco_id', models.BigIntegerField(db_index=True, default=0)),
|
||||
('healpix', models.BigIntegerField(db_index=True, default=0)),
|
||||
('ra', models.FloatField(default=0.0)),
|
||||
('dec', models.FloatField(default=0.0)),
|
||||
('programid', models.IntegerField(db_index=True, default=0)),
|
||||
('magpsf', models.FloatField(default=0.0)),
|
||||
('sigmapsf', models.FloatField(default=0.0)),
|
||||
('magap', models.FloatField(default=0.0)),
|
||||
('sigmagap', models.FloatField(default=0.0)),
|
||||
('wall_time', models.DateTimeField(blank=True)),
|
||||
('diffmaglim', models.FloatField(default=0.0)),
|
||||
('deltamagref', models.FloatField(default=0.0)),
|
||||
('deltamaglatest', models.FloatField(default=0.0)),
|
||||
('rb', models.FloatField(default=0.0)),
|
||||
],
|
||||
),
|
||||
]
|
17
astrobasis/migrations/0003_remove_ztfalert_wall_time.py
Normal file
17
astrobasis/migrations/0003_remove_ztfalert_wall_time.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# Generated by Django 2.2.6 on 2020-01-28 18:31
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0002_ztfalert'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='ztfalert',
|
||||
name='wall_time',
|
||||
),
|
||||
]
|
18
astrobasis/migrations/0004_ztfalert_wall_time.py
Normal file
18
astrobasis/migrations/0004_ztfalert_wall_time.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 2.2.6 on 2020-01-28 18:32
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0003_remove_ztfalert_wall_time'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='ztfalert',
|
||||
name='wall_time',
|
||||
field=models.CharField(blank=True, default='', max_length=29),
|
||||
),
|
||||
]
|
23
astrobasis/migrations/0005_auto_20200128_2138.py
Normal file
23
astrobasis/migrations/0005_auto_20200128_2138.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 2.2.6 on 2020-01-28 18:38
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0004_ztfalert_wall_time'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='ztfalert',
|
||||
name='deltamaglatest',
|
||||
field=models.FloatField(default=0.0, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='ztfalert',
|
||||
name='deltamagref',
|
||||
field=models.FloatField(default=0.0, null=True),
|
||||
),
|
||||
]
|
16
astrobasis/migrations/0006_delete_ztfalert.py
Normal file
16
astrobasis/migrations/0006_delete_ztfalert.py
Normal file
@@ -0,0 +1,16 @@
|
||||
# Generated by Django 2.2.6 on 2020-01-28 18:42
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0005_auto_20200128_2138'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.DeleteModel(
|
||||
name='ZTFAlert',
|
||||
),
|
||||
]
|
36
astrobasis/migrations/0007_ztfalert.py
Normal file
36
astrobasis/migrations/0007_ztfalert.py
Normal file
@@ -0,0 +1,36 @@
|
||||
# Generated by Django 2.2.6 on 2020-01-28 18:42
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0006_delete_ztfalert'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='ZTFAlert',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('objectId', models.CharField(blank=True, default='', max_length=12)),
|
||||
('fid', models.IntegerField(db_index=True, default=0)),
|
||||
('lco_id', models.BigIntegerField(db_index=True, default=0)),
|
||||
('healpix', models.BigIntegerField(db_index=True, default=0)),
|
||||
('ra', models.FloatField(default=0.0)),
|
||||
('dec', models.FloatField(default=0.0)),
|
||||
('programid', models.IntegerField(db_index=True, default=0)),
|
||||
('magpsf', models.FloatField(default=0.0)),
|
||||
('sigmapsf', models.FloatField(default=0.0)),
|
||||
('magap', models.FloatField(default=0.0)),
|
||||
('sigmagap', models.FloatField(default=0.0)),
|
||||
('wall_time', models.CharField(blank=True, default='', max_length=29)),
|
||||
('diffmaglim', models.FloatField(default=0.0)),
|
||||
('deltamagref', models.FloatField(default=0.0, null=True)),
|
||||
('deltamaglatest', models.FloatField(default=0.0, null=True)),
|
||||
('rb', models.FloatField(default=0.0)),
|
||||
('created', models.DateTimeField(auto_now_add=True)),
|
||||
],
|
||||
),
|
||||
]
|
18
astrobasis/migrations/0008_ztfalert_healpix_plate.py
Normal file
18
astrobasis/migrations/0008_ztfalert_healpix_plate.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 2.2.6 on 2020-01-29 07:32
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0007_ztfalert'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='ztfalert',
|
||||
name='healpix_plate',
|
||||
field=models.IntegerField(default=0),
|
||||
),
|
||||
]
|
19
astrobasis/migrations/0009_ztfalert_survey.py
Normal file
19
astrobasis/migrations/0009_ztfalert_survey.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# Generated by Django 2.2.6 on 2020-01-29 07:49
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('monthplan', '0002_auto_20191209_2233'),
|
||||
('astrobasis', '0008_ztfalert_healpix_plate'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='ztfalert',
|
||||
name='survey',
|
||||
field=models.ManyToManyField(to='monthplan.Survey'),
|
||||
),
|
||||
]
|
33
astrobasis/migrations/0010_auto_20200129_1339.py
Normal file
33
astrobasis/migrations/0010_auto_20200129_1339.py
Normal file
@@ -0,0 +1,33 @@
|
||||
# Generated by Django 2.2.6 on 2020-01-29 10:39
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0009_ztfalert_survey'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='ztfalert',
|
||||
name='elong',
|
||||
field=models.FloatField(default=0.0),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='ztfalert',
|
||||
name='fwhm',
|
||||
field=models.FloatField(default=0.0),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='ztfalert',
|
||||
name='magdiff',
|
||||
field=models.FloatField(default=0.0),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='ztfalert',
|
||||
name='nbad',
|
||||
field=models.IntegerField(default=0),
|
||||
),
|
||||
]
|
17
astrobasis/migrations/0011_remove_ztfalert_wall_time.py
Normal file
17
astrobasis/migrations/0011_remove_ztfalert_wall_time.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# Generated by Django 2.2.6 on 2020-01-29 12:49
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0010_auto_20200129_1339'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='ztfalert',
|
||||
name='wall_time',
|
||||
),
|
||||
]
|
19
astrobasis/migrations/0012_ztfalert_wall_time.py
Normal file
19
astrobasis/migrations/0012_ztfalert_wall_time.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# Generated by Django 2.2.6 on 2020-01-29 12:52
|
||||
|
||||
import datetime
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0011_remove_ztfalert_wall_time'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='ztfalert',
|
||||
name='wall_time',
|
||||
field=models.DateTimeField(blank=True, default=datetime.datetime.now),
|
||||
),
|
||||
]
|
44
astrobasis/migrations/0013_alerce.py
Normal file
44
astrobasis/migrations/0013_alerce.py
Normal file
@@ -0,0 +1,44 @@
|
||||
# Generated by Django 2.2.6 on 2020-01-29 15:29
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('monthplan', '0002_auto_20191209_2233'),
|
||||
('astrobasis', '0012_ztfalert_wall_time'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='ALeRCE',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('healpix', models.BigIntegerField(db_index=True, default=0)),
|
||||
('healpix_plate', models.IntegerField(default=0)),
|
||||
('created', models.DateTimeField(auto_now_add=True)),
|
||||
('classearly', models.IntegerField(default=0)),
|
||||
('classrf', models.IntegerField(default=0)),
|
||||
('oid', models.CharField(default='', max_length=12)),
|
||||
('firstmjd', models.FloatField(default=0.0)),
|
||||
('lastmjd', models.FloatField(default=0.0)),
|
||||
('mean_magap_g', models.FloatField(default=0.0)),
|
||||
('mean_magap_r', models.FloatField(default=0.0)),
|
||||
('mean_magpsf_g', models.FloatField(default=0.0)),
|
||||
('mean_magpsf_r', models.FloatField(default=0.0)),
|
||||
('meandec', models.FloatField(default=0.0)),
|
||||
('meanra', models.FloatField(default=0.0)),
|
||||
('nobs', models.IntegerField(default=0)),
|
||||
('pclassearly', models.FloatField(default=0.0)),
|
||||
('pclassrf', models.FloatField(default=0.0)),
|
||||
('sigma_magap_g', models.FloatField(default=0.0)),
|
||||
('sigma_magap_r', models.FloatField(default=0.0)),
|
||||
('sigma_magpsf_g', models.FloatField(default=0.0)),
|
||||
('sigma_magpsf_r', models.FloatField(default=0.0)),
|
||||
('sigmadec', models.FloatField(default=0.0)),
|
||||
('sigmara', models.FloatField(default=0.0)),
|
||||
('survey', models.ManyToManyField(to='monthplan.Survey')),
|
||||
],
|
||||
),
|
||||
]
|
18
astrobasis/migrations/0014_auto_20200129_1948.py
Normal file
18
astrobasis/migrations/0014_auto_20200129_1948.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 2.2.6 on 2020-01-29 16:48
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0013_alerce'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='alerce',
|
||||
name='classrf',
|
||||
field=models.IntegerField(default=0, null=True),
|
||||
),
|
||||
]
|
33
astrobasis/migrations/0015_auto_20200129_1949.py
Normal file
33
astrobasis/migrations/0015_auto_20200129_1949.py
Normal file
@@ -0,0 +1,33 @@
|
||||
# Generated by Django 2.2.6 on 2020-01-29 16:49
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0014_auto_20200129_1948'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='alerce',
|
||||
name='mean_magap_g',
|
||||
field=models.FloatField(default=0.0, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='alerce',
|
||||
name='mean_magap_r',
|
||||
field=models.FloatField(default=0.0, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='alerce',
|
||||
name='mean_magpsf_g',
|
||||
field=models.FloatField(default=0.0, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='alerce',
|
||||
name='mean_magpsf_r',
|
||||
field=models.FloatField(default=0.0, null=True),
|
||||
),
|
||||
]
|
23
astrobasis/migrations/0016_auto_20200129_1949.py
Normal file
23
astrobasis/migrations/0016_auto_20200129_1949.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 2.2.6 on 2020-01-29 16:49
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0015_auto_20200129_1949'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='alerce',
|
||||
name='pclassearly',
|
||||
field=models.FloatField(default=0.0, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='alerce',
|
||||
name='pclassrf',
|
||||
field=models.FloatField(default=0.0, null=True),
|
||||
),
|
||||
]
|
33
astrobasis/migrations/0017_auto_20200129_1950.py
Normal file
33
astrobasis/migrations/0017_auto_20200129_1950.py
Normal file
@@ -0,0 +1,33 @@
|
||||
# Generated by Django 2.2.6 on 2020-01-29 16:50
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0016_auto_20200129_1949'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='alerce',
|
||||
name='sigma_magap_g',
|
||||
field=models.FloatField(default=0.0, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='alerce',
|
||||
name='sigma_magap_r',
|
||||
field=models.FloatField(default=0.0, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='alerce',
|
||||
name='sigma_magpsf_g',
|
||||
field=models.FloatField(default=0.0, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='alerce',
|
||||
name='sigma_magpsf_r',
|
||||
field=models.FloatField(default=0.0, null=True),
|
||||
),
|
||||
]
|
18
astrobasis/migrations/0018_auto_20200130_1300.py
Normal file
18
astrobasis/migrations/0018_auto_20200130_1300.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 2.2.6 on 2020-01-30 10:00
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0017_auto_20200129_1950'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='alerce',
|
||||
name='classearly',
|
||||
field=models.IntegerField(default=0, null=True),
|
||||
),
|
||||
]
|
23
astrobasis/migrations/0019_auto_20200130_1455.py
Normal file
23
astrobasis/migrations/0019_auto_20200130_1455.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 2.2.6 on 2020-01-30 11:55
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0018_auto_20200130_1300'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='alerce',
|
||||
name='sigmadec',
|
||||
field=models.FloatField(default=0.0, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='alerce',
|
||||
name='sigmara',
|
||||
field=models.FloatField(default=0.0, null=True),
|
||||
),
|
||||
]
|
24
astrobasis/migrations/0020_auto_20200130_1726.py
Normal file
24
astrobasis/migrations/0020_auto_20200130_1726.py
Normal file
@@ -0,0 +1,24 @@
|
||||
# Generated by Django 2.2.6 on 2020-01-30 14:26
|
||||
|
||||
import datetime
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0019_auto_20200130_1455'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='alerce',
|
||||
name='firstdate',
|
||||
field=models.DateTimeField(default=datetime.datetime.now),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='alerce',
|
||||
name='lastdate',
|
||||
field=models.DateTimeField(default=datetime.datetime.now),
|
||||
),
|
||||
]
|
18
astrobasis/migrations/0021_gaiadr2_error_radius.py
Normal file
18
astrobasis/migrations/0021_gaiadr2_error_radius.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 2.2.6 on 2020-01-31 10:17
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0020_auto_20200130_1726'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='gaiadr2',
|
||||
name='error_radius',
|
||||
field=models.FloatField(default=0.0),
|
||||
),
|
||||
]
|
18
astrobasis/migrations/0022_alerce_error_radius.py
Normal file
18
astrobasis/migrations/0022_alerce_error_radius.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 2.2.6 on 2020-01-31 12:18
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0021_gaiadr2_error_radius'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='alerce',
|
||||
name='error_radius',
|
||||
field=models.FloatField(default=0.0),
|
||||
),
|
||||
]
|
21
astrobasis/migrations/0023_auto_20200131_1555.py
Normal file
21
astrobasis/migrations/0023_auto_20200131_1555.py
Normal file
@@ -0,0 +1,21 @@
|
||||
# Generated by Django 2.2.6 on 2020-01-31 12:55
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0022_alerce_error_radius'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='alerce',
|
||||
name='meandec',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='alerce',
|
||||
name='meanra',
|
||||
),
|
||||
]
|
23
astrobasis/migrations/0024_auto_20200131_1556.py
Normal file
23
astrobasis/migrations/0024_auto_20200131_1556.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 2.2.6 on 2020-01-31 12:56
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0023_auto_20200131_1555'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='alerce',
|
||||
name='dec',
|
||||
field=models.FloatField(default=0.0),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='alerce',
|
||||
name='ra',
|
||||
field=models.FloatField(default=0.0),
|
||||
),
|
||||
]
|
29
astrobasis/migrations/0025_sdssdr12spec.py
Normal file
29
astrobasis/migrations/0025_sdssdr12spec.py
Normal file
@@ -0,0 +1,29 @@
|
||||
# Generated by Django 2.2.6 on 2020-02-03 13:45
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0024_auto_20200131_1556'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='SDSSDR12Spec',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('healpix', models.BigIntegerField(db_index=True, default=0)),
|
||||
('MJD', models.FloatField(default=0.0)),
|
||||
('ra', models.FloatField(default=0.0)),
|
||||
('dec', models.FloatField(default=0.0)),
|
||||
('obj_class', models.CharField(default='', max_length=6)),
|
||||
('obj_subclass', models.CharField(default='', max_length=21)),
|
||||
('z', models.FloatField(default=0.0)),
|
||||
('z_err', models.FloatField(default=0.0)),
|
||||
('specobjid', models.CharField(default='', max_length=22)),
|
||||
('targetobjid', models.CharField(default='', max_length=22)),
|
||||
],
|
||||
),
|
||||
]
|
27
astrobasis/migrations/0026_flesch_z.py
Normal file
27
astrobasis/migrations/0026_flesch_z.py
Normal file
@@ -0,0 +1,27 @@
|
||||
# Generated by Django 2.2.6 on 2020-02-10 15:41
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0025_sdssdr12spec'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Flesch_z',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('healpix', models.BigIntegerField(db_index=True, default=0)),
|
||||
('ra', models.FloatField(default=0.0)),
|
||||
('dec', models.FloatField(default=0.0)),
|
||||
('name', models.CharField(default='', max_length=25)),
|
||||
('obj_class', models.CharField(default='', max_length=4)),
|
||||
('Rmag', models.FloatField(default=0.0)),
|
||||
('Bmag', models.FloatField(default=0.0)),
|
||||
('z', models.FloatField(default=0.0)),
|
||||
],
|
||||
),
|
||||
]
|
16
astrobasis/migrations/0027_delete_flesch_z.py
Normal file
16
astrobasis/migrations/0027_delete_flesch_z.py
Normal file
@@ -0,0 +1,16 @@
|
||||
# Generated by Django 2.2.6 on 2020-02-10 15:43
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0026_flesch_z'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.DeleteModel(
|
||||
name='Flesch_z',
|
||||
),
|
||||
]
|
27
astrobasis/migrations/0028_flesch.py
Normal file
27
astrobasis/migrations/0028_flesch.py
Normal file
@@ -0,0 +1,27 @@
|
||||
# Generated by Django 2.2.6 on 2020-02-10 15:43
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0027_delete_flesch_z'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Flesch',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('healpix', models.BigIntegerField(db_index=True, default=0)),
|
||||
('ra', models.FloatField(default=0.0)),
|
||||
('dec', models.FloatField(default=0.0)),
|
||||
('name', models.CharField(default='', max_length=25)),
|
||||
('obj_class', models.CharField(default='', max_length=4)),
|
||||
('Rmag', models.FloatField(default=0.0)),
|
||||
('Bmag', models.FloatField(default=0.0)),
|
||||
('z', models.FloatField(default=0.0)),
|
||||
],
|
||||
),
|
||||
]
|
28
astrobasis/migrations/0029_simbad.py
Normal file
28
astrobasis/migrations/0029_simbad.py
Normal file
@@ -0,0 +1,28 @@
|
||||
# Generated by Django 2.2.6 on 2020-02-22 19:54
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0028_flesch'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Simbad',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('ra', models.FloatField(default=0.0)),
|
||||
('dec', models.FloatField(default=0.0)),
|
||||
('error_radius', models.FloatField(default=0.0)),
|
||||
('main_id', models.CharField(default='', max_length=25)),
|
||||
('obj_class', models.CharField(default='', max_length=4)),
|
||||
('coo_bibcode', models.CharField(default='', max_length=25)),
|
||||
('coo_wavelength', models.CharField(default='', max_length=3)),
|
||||
('z', models.FloatField(default=0.0)),
|
||||
('otype', models.CharField(default='', max_length=21)),
|
||||
],
|
||||
),
|
||||
]
|
18
astrobasis/migrations/0030_auto_20200223_0814.py
Normal file
18
astrobasis/migrations/0030_auto_20200223_0814.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 2.2.6 on 2020-02-23 05:14
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0029_simbad'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='simbad',
|
||||
name='main_id',
|
||||
field=models.CharField(max_length=25, unique=True),
|
||||
),
|
||||
]
|
18
astrobasis/migrations/0031_simbad_healpix.py
Normal file
18
astrobasis/migrations/0031_simbad_healpix.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 2.2.6 on 2020-02-23 11:01
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0030_auto_20200223_0814'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='simbad',
|
||||
name='healpix',
|
||||
field=models.BigIntegerField(db_index=True, default=0),
|
||||
),
|
||||
]
|
18
astrobasis/migrations/0032_auto_20200223_1650.py
Normal file
18
astrobasis/migrations/0032_auto_20200223_1650.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 2.2.6 on 2020-02-23 13:50
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0031_simbad_healpix'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='simbad',
|
||||
name='main_id',
|
||||
field=models.CharField(max_length=51, unique=True),
|
||||
),
|
||||
]
|
18
astrobasis/migrations/0033_auto_20200225_1604.py
Normal file
18
astrobasis/migrations/0033_auto_20200225_1604.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 2.2.6 on 2020-02-25 13:04
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0032_auto_20200223_1650'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='simbad',
|
||||
name='coo_wavelength',
|
||||
field=models.CharField(default='', max_length=5),
|
||||
),
|
||||
]
|
18
astrobasis/migrations/0034_auto_20200225_1608.py
Normal file
18
astrobasis/migrations/0034_auto_20200225_1608.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 2.2.6 on 2020-02-25 13:08
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0033_auto_20200225_1604'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='simbad',
|
||||
name='obj_class',
|
||||
field=models.CharField(default='', max_length=10),
|
||||
),
|
||||
]
|
18
astrobasis/migrations/0035_auto_20200225_1625.py
Normal file
18
astrobasis/migrations/0035_auto_20200225_1625.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 2.2.6 on 2020-02-25 13:25
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0034_auto_20200225_1608'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='simbad',
|
||||
name='obj_class',
|
||||
field=models.CharField(default='', max_length=21),
|
||||
),
|
||||
]
|
78
astrobasis/migrations/0036_wise.py
Normal file
78
astrobasis/migrations/0036_wise.py
Normal file
@@ -0,0 +1,78 @@
|
||||
# Generated by Django 3.0.8 on 2020-07-22 14:28
|
||||
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0035_auto_20200225_1625'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Wise',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('sep', models.FloatField(default=0, validators=[django.core.validators.MinValueValidator(0.0)])),
|
||||
('objID', models.BigIntegerField(default=0)),
|
||||
('raStack', models.FloatField(default=0.0)),
|
||||
('decStack', models.FloatField(default=0.0)),
|
||||
('raStackErr', models.FloatField(default=0.0)),
|
||||
('decStackErr', models.FloatField(default=0.0)),
|
||||
('raMean', models.FloatField(default=0.0)),
|
||||
('decMean', models.FloatField(default=0.0)),
|
||||
('raMeanErr', models.FloatField(default=0.0)),
|
||||
('decMeanErr', models.FloatField(default=0.0)),
|
||||
('objInfoFlag', models.BigIntegerField(default=0)),
|
||||
('qualityFlag', models.IntegerField(default=0)),
|
||||
('primaryDetection', models.IntegerField(default=0)),
|
||||
('bestDetection', models.IntegerField(default=0)),
|
||||
('gPSFMag', models.FloatField(default=0.0)),
|
||||
('gPSFMagErr', models.FloatField(default=0.0)),
|
||||
('gApMag', models.FloatField(default=0.0)),
|
||||
('gApMagErr', models.FloatField(default=0.0)),
|
||||
('gKronMag', models.FloatField(default=0.0)),
|
||||
('gKronMagErr', models.FloatField(default=0.0)),
|
||||
('rPSFMag', models.FloatField(default=0.0)),
|
||||
('rPSFMagErr', models.FloatField(default=0.0)),
|
||||
('rApMag', models.FloatField(default=0.0)),
|
||||
('rApMagErr', models.FloatField(default=0.0)),
|
||||
('rKronMag', models.FloatField(default=0.0)),
|
||||
('rKronMagErr', models.FloatField(default=0.0)),
|
||||
('iPSFMag', models.FloatField(default=0.0)),
|
||||
('iPSFMagErr', models.FloatField(default=0.0)),
|
||||
('iApMag', models.FloatField(default=0.0)),
|
||||
('iApMagErr', models.FloatField(default=0.0)),
|
||||
('iKronMag', models.FloatField(default=0.0)),
|
||||
('iKronMagErr', models.FloatField(default=0.0)),
|
||||
('zPSFMag', models.FloatField(default=0.0)),
|
||||
('zPSFMagErr', models.FloatField(default=0.0)),
|
||||
('zApMag', models.FloatField(default=0.0)),
|
||||
('zApMagErr', models.FloatField(default=0.0)),
|
||||
('zKronMag', models.FloatField(default=0.0)),
|
||||
('zKronMagErr', models.FloatField(default=0.0)),
|
||||
('yPSFMag', models.FloatField(default=0.0)),
|
||||
('yPSFMagErr', models.FloatField(default=0.0)),
|
||||
('yApMag', models.FloatField(default=0.0)),
|
||||
('yApMagErr', models.FloatField(default=0.0)),
|
||||
('yKronMag', models.FloatField(default=0.0)),
|
||||
('yKronMagErr', models.FloatField(default=0.0)),
|
||||
('wisefield', models.CharField(default='', max_length=8)),
|
||||
('fitext', models.BooleanField(default=False, null=True)),
|
||||
('devaucou', models.BooleanField(default=False, null=True)),
|
||||
('star', models.BooleanField(default=False, null=True)),
|
||||
('w1flux', models.FloatField(default=0.0)),
|
||||
('dw1flux', models.FloatField(default=0.0)),
|
||||
('w1mag', models.FloatField(default=0.0)),
|
||||
('dw1mag', models.FloatField(default=0.0)),
|
||||
('w1reff', models.FloatField(default=0.0)),
|
||||
('w2flux', models.FloatField(default=0.0)),
|
||||
('dw2flux', models.FloatField(default=0.0)),
|
||||
('w2mag', models.FloatField(default=0.0)),
|
||||
('dw2mag', models.FloatField(default=0.0)),
|
||||
('w2reff', models.FloatField(default=0.0)),
|
||||
],
|
||||
),
|
||||
]
|
16
astrobasis/migrations/0037_delete_wise.py
Normal file
16
astrobasis/migrations/0037_delete_wise.py
Normal file
@@ -0,0 +1,16 @@
|
||||
# Generated by Django 3.0.8 on 2020-07-22 14:30
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0036_wise'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.DeleteModel(
|
||||
name='Wise',
|
||||
),
|
||||
]
|
29
astrobasis/migrations/0038_allwise.py
Normal file
29
astrobasis/migrations/0038_allwise.py
Normal file
@@ -0,0 +1,29 @@
|
||||
# Generated by Django 3.0.8 on 2020-08-04 06:37
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0037_delete_wise'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='AllWise',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('ra', models.FloatField(default=0.0)),
|
||||
('dec', models.FloatField(default=0.0)),
|
||||
('healpix', models.BigIntegerField(db_index=True, default=0)),
|
||||
('error_radius', models.FloatField(default=0.0)),
|
||||
('name', models.CharField(max_length=51, unique=True)),
|
||||
('image_url', models.CharField(default='', max_length=150)),
|
||||
('W1mag', models.FloatField(default=0.0)),
|
||||
('e_W1mag', models.FloatField(default=0.0)),
|
||||
('W2mag', models.FloatField(default=0.0)),
|
||||
('e_W2mag', models.FloatField(default=0.0)),
|
||||
],
|
||||
),
|
||||
]
|
17
astrobasis/migrations/0039_remove_allwise_image_url.py
Normal file
17
astrobasis/migrations/0039_remove_allwise_image_url.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# Generated by Django 3.0.8 on 2020-08-04 06:49
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0038_allwise'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='allwise',
|
||||
name='image_url',
|
||||
),
|
||||
]
|
26
astrobasis/migrations/0040_nvss.py
Normal file
26
astrobasis/migrations/0040_nvss.py
Normal file
@@ -0,0 +1,26 @@
|
||||
# Generated by Django 3.0.8 on 2020-08-04 10:24
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0039_remove_allwise_image_url'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='NVSS',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('ra', models.FloatField(default=0.0)),
|
||||
('dec', models.FloatField(default=0.0)),
|
||||
('healpix', models.BigIntegerField(db_index=True, default=0)),
|
||||
('error_radius', models.FloatField(default=0.0)),
|
||||
('name', models.CharField(max_length=51, unique=True)),
|
||||
('S14', models.FloatField(default=0.0)),
|
||||
('e_S14', models.FloatField(default=0.0)),
|
||||
],
|
||||
),
|
||||
]
|
23
astrobasis/migrations/0041_auto_20200804_1457.py
Normal file
23
astrobasis/migrations/0041_auto_20200804_1457.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 3.0.8 on 2020-08-04 11:57
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0040_nvss'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='nvss',
|
||||
name='e_dec',
|
||||
field=models.FloatField(default=0.0),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='nvss',
|
||||
name='e_ra',
|
||||
field=models.FloatField(default=0.0),
|
||||
),
|
||||
]
|
29
astrobasis/migrations/0042_first.py
Normal file
29
astrobasis/migrations/0042_first.py
Normal file
@@ -0,0 +1,29 @@
|
||||
# Generated by Django 3.0.8 on 2020-08-04 12:17
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0041_auto_20200804_1457'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='FIRST',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('ra', models.FloatField(default=0.0)),
|
||||
('dec', models.FloatField(default=0.0)),
|
||||
('healpix', models.BigIntegerField(db_index=True, default=0)),
|
||||
('error_radius', models.FloatField(default=0.0)),
|
||||
('name', models.CharField(max_length=51, unique=True)),
|
||||
('Fpeak', models.FloatField(default=0.0)),
|
||||
('Fint', models.FloatField(default=0.0)),
|
||||
('rms', models.FloatField(default=0.0)),
|
||||
('major_axis', models.FloatField(default=0.0)),
|
||||
('minor_axis', models.FloatField(default=0.0)),
|
||||
],
|
||||
),
|
||||
]
|
32
astrobasis/migrations/0043_sumss.py
Normal file
32
astrobasis/migrations/0043_sumss.py
Normal file
@@ -0,0 +1,32 @@
|
||||
# Generated by Django 3.0.8 on 2020-08-04 13:20
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0042_first'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='SUMSS',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('ra', models.FloatField(default=0.0)),
|
||||
('dec', models.FloatField(default=0.0)),
|
||||
('e_ra', models.FloatField(default=0.0)),
|
||||
('e_dec', models.FloatField(default=0.0)),
|
||||
('healpix', models.BigIntegerField(db_index=True, default=0)),
|
||||
('error_radius', models.FloatField(default=0.0)),
|
||||
('name', models.CharField(max_length=51, unique=True)),
|
||||
('Sp', models.FloatField(default=0.0)),
|
||||
('e_Sp', models.FloatField(default=0.0)),
|
||||
('St', models.FloatField(default=0.0)),
|
||||
('e_St', models.FloatField(default=0.0)),
|
||||
('major_axis', models.FloatField(default=0.0)),
|
||||
('minor_axis', models.FloatField(default=0.0)),
|
||||
],
|
||||
),
|
||||
]
|
23
astrobasis/migrations/0044_auto_20200804_1703.py
Normal file
23
astrobasis/migrations/0044_auto_20200804_1703.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 3.0.8 on 2020-08-04 14:03
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0043_sumss'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='sumss',
|
||||
name='dec_orig',
|
||||
field=models.FloatField(default=0.0),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='sumss',
|
||||
name='ra_orig',
|
||||
field=models.FloatField(default=0.0),
|
||||
),
|
||||
]
|
23
astrobasis/migrations/0045_auto_20200804_1707.py
Normal file
23
astrobasis/migrations/0045_auto_20200804_1707.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 3.0.8 on 2020-08-04 14:07
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0044_auto_20200804_1703'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='sumss',
|
||||
name='dec_orig',
|
||||
field=models.CharField(max_length=51, unique=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='sumss',
|
||||
name='ra_orig',
|
||||
field=models.CharField(max_length=51, unique=True),
|
||||
),
|
||||
]
|
40
astrobasis/migrations/0046_gaiadr3.py
Normal file
40
astrobasis/migrations/0046_gaiadr3.py
Normal file
@@ -0,0 +1,40 @@
|
||||
# Generated by Django 3.0.8 on 2021-02-12 10:24
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0045_auto_20200804_1707'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='GAIADR3',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('healpix', models.BigIntegerField(db_index=True, default=0)),
|
||||
('solution_id', models.CharField(blank=True, default='', max_length=19)),
|
||||
('name', models.CharField(blank=True, default='', max_length=30)),
|
||||
('source_id', models.CharField(blank=True, default='', max_length=19)),
|
||||
('error_radius', models.FloatField(default=0.0)),
|
||||
('ref_epoch', models.FloatField(default=0.0)),
|
||||
('ra', models.FloatField(default=0.0)),
|
||||
('ra_error', models.FloatField(default=0.0)),
|
||||
('dec', models.FloatField(default=0.0)),
|
||||
('dec_error', models.FloatField(default=0.0)),
|
||||
('parallax', models.FloatField(default=0.0)),
|
||||
('parallax_error', models.FloatField(default=0.0)),
|
||||
('pmra', models.FloatField(default=0.0)),
|
||||
('pmra_error', models.FloatField(default=0.0)),
|
||||
('pmdec', models.FloatField(default=0.0)),
|
||||
('pmdec_error', models.FloatField(default=0.0)),
|
||||
('phot_g_mean_mag', models.FloatField(default=0.0)),
|
||||
('phot_bp_mean_mag', models.FloatField(default=0.0)),
|
||||
('phot_rp_mean_mag', models.FloatField(default=0.0)),
|
||||
('filename', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='astrobasis.GaiaSourceFile')),
|
||||
],
|
||||
),
|
||||
]
|
17
astrobasis/migrations/0047_remove_gaiadr3_filename.py
Normal file
17
astrobasis/migrations/0047_remove_gaiadr3_filename.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# Generated by Django 3.0.8 on 2021-02-12 10:30
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0046_gaiadr3'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='gaiadr3',
|
||||
name='filename',
|
||||
),
|
||||
]
|
16
astrobasis/migrations/0048_delete_gaiadr3.py
Normal file
16
astrobasis/migrations/0048_delete_gaiadr3.py
Normal file
@@ -0,0 +1,16 @@
|
||||
# Generated by Django 3.0.8 on 2021-02-12 10:33
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0047_remove_gaiadr3_filename'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.DeleteModel(
|
||||
name='GAIADR3',
|
||||
),
|
||||
]
|
40
astrobasis/migrations/0049_gaiadr3.py
Normal file
40
astrobasis/migrations/0049_gaiadr3.py
Normal file
@@ -0,0 +1,40 @@
|
||||
# Generated by Django 3.0.8 on 2021-02-12 10:33
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0048_delete_gaiadr3'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='GAIADR3',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('healpix', models.BigIntegerField(db_index=True, default=0)),
|
||||
('solution_id', models.CharField(blank=True, default='', max_length=19)),
|
||||
('name', models.CharField(blank=True, default='', max_length=30)),
|
||||
('source_id', models.CharField(blank=True, default='', max_length=19)),
|
||||
('error_radius', models.FloatField(default=0.0)),
|
||||
('ref_epoch', models.FloatField(default=0.0)),
|
||||
('ra', models.FloatField(default=0.0)),
|
||||
('ra_error', models.FloatField(default=0.0)),
|
||||
('dec', models.FloatField(default=0.0)),
|
||||
('dec_error', models.FloatField(default=0.0)),
|
||||
('parallax', models.FloatField(default=0.0)),
|
||||
('parallax_error', models.FloatField(default=0.0)),
|
||||
('pmra', models.FloatField(default=0.0)),
|
||||
('pmra_error', models.FloatField(default=0.0)),
|
||||
('pmdec', models.FloatField(default=0.0)),
|
||||
('pmdec_error', models.FloatField(default=0.0)),
|
||||
('phot_g_mean_mag', models.FloatField(default=0.0)),
|
||||
('phot_bp_mean_mag', models.FloatField(default=0.0)),
|
||||
('phot_rp_mean_mag', models.FloatField(default=0.0)),
|
||||
('filename', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='astrobasis.GaiaSourceFile')),
|
||||
],
|
||||
),
|
||||
]
|
16
astrobasis/migrations/0050_delete_gaiadr3.py
Normal file
16
astrobasis/migrations/0050_delete_gaiadr3.py
Normal file
@@ -0,0 +1,16 @@
|
||||
# Generated by Django 3.0.8 on 2021-02-12 12:02
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0049_gaiadr3'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.DeleteModel(
|
||||
name='GAIADR3',
|
||||
),
|
||||
]
|
49
astrobasis/migrations/0051_gaiadr3_gaiasourcefiledr3.py
Normal file
49
astrobasis/migrations/0051_gaiadr3_gaiasourcefiledr3.py
Normal file
@@ -0,0 +1,49 @@
|
||||
# Generated by Django 3.0.8 on 2021-02-12 12:03
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0050_delete_gaiadr3'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='GaiaSourceFileDR3',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('filename', models.CharField(blank=True, default='', max_length=80)),
|
||||
('status', models.CharField(default='empty', max_length=7)),
|
||||
('nrows', models.IntegerField(default=0)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='GAIADR3',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('healpix', models.BigIntegerField(db_index=True, default=0)),
|
||||
('solution_id', models.CharField(blank=True, default='', max_length=19)),
|
||||
('name', models.CharField(blank=True, default='', max_length=30)),
|
||||
('source_id', models.CharField(blank=True, default='', max_length=19)),
|
||||
('error_radius', models.FloatField(default=0.0)),
|
||||
('ref_epoch', models.FloatField(default=0.0)),
|
||||
('ra', models.FloatField(default=0.0)),
|
||||
('ra_error', models.FloatField(default=0.0)),
|
||||
('dec', models.FloatField(default=0.0)),
|
||||
('dec_error', models.FloatField(default=0.0)),
|
||||
('parallax', models.FloatField(default=0.0)),
|
||||
('parallax_error', models.FloatField(default=0.0)),
|
||||
('pmra', models.FloatField(default=0.0)),
|
||||
('pmra_error', models.FloatField(default=0.0)),
|
||||
('pmdec', models.FloatField(default=0.0)),
|
||||
('pmdec_error', models.FloatField(default=0.0)),
|
||||
('phot_g_mean_mag', models.FloatField(default=0.0)),
|
||||
('phot_bp_mean_mag', models.FloatField(default=0.0)),
|
||||
('phot_rp_mean_mag', models.FloatField(default=0.0)),
|
||||
('filename', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='astrobasis.GaiaSourceFileDR3')),
|
||||
],
|
||||
),
|
||||
]
|
17
astrobasis/migrations/0052_remove_gaiadr3_solution_id.py
Normal file
17
astrobasis/migrations/0052_remove_gaiadr3_solution_id.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# Generated by Django 3.0.8 on 2021-02-12 12:14
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0051_gaiadr3_gaiasourcefiledr3'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='gaiadr3',
|
||||
name='solution_id',
|
||||
),
|
||||
]
|
17
astrobasis/migrations/0053_remove_gaiadr3_ref_epoch.py
Normal file
17
astrobasis/migrations/0053_remove_gaiadr3_ref_epoch.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# Generated by Django 3.0.8 on 2021-02-12 12:15
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0052_remove_gaiadr3_solution_id'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='gaiadr3',
|
||||
name='ref_epoch',
|
||||
),
|
||||
]
|
23
astrobasis/migrations/0054_auto_20210812_1858.py
Normal file
23
astrobasis/migrations/0054_auto_20210812_1858.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 3.0.8 on 2021-08-12 15:58
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0053_remove_gaiadr3_ref_epoch'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='sumss',
|
||||
name='dec_orig',
|
||||
field=models.CharField(max_length=51),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='sumss',
|
||||
name='ra_orig',
|
||||
field=models.CharField(max_length=51),
|
||||
),
|
||||
]
|
78
astrobasis/migrations/0055_auto_20211229_1259.py
Normal file
78
astrobasis/migrations/0055_auto_20211229_1259.py
Normal file
@@ -0,0 +1,78 @@
|
||||
# Generated by Django 3.2.10 on 2021-12-29 09:59
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0054_auto_20210812_1858'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='alerce',
|
||||
name='id',
|
||||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='allwise',
|
||||
name='id',
|
||||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='first',
|
||||
name='id',
|
||||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='flesch',
|
||||
name='id',
|
||||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='gaiadr2',
|
||||
name='id',
|
||||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='gaiadr3',
|
||||
name='id',
|
||||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='gaiasourcefile',
|
||||
name='id',
|
||||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='gaiasourcefiledr3',
|
||||
name='id',
|
||||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='nvss',
|
||||
name='id',
|
||||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='sdssdr12spec',
|
||||
name='id',
|
||||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='simbad',
|
||||
name='id',
|
||||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='sumss',
|
||||
name='id',
|
||||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='ztfalert',
|
||||
name='id',
|
||||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
|
||||
),
|
||||
]
|
39
astrobasis/migrations/0056_twomass.py
Normal file
39
astrobasis/migrations/0056_twomass.py
Normal file
@@ -0,0 +1,39 @@
|
||||
# Generated by Django 3.2.12 on 2022-03-05 16:39
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0055_auto_20211229_1259'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='TwoMASS',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('healpix', models.BigIntegerField(db_index=True, default=0)),
|
||||
('ra', models.FloatField(default=0.0)),
|
||||
('dec', models.FloatField(default=0.0)),
|
||||
('error_radius', models.FloatField(default=0.5)),
|
||||
('name', models.CharField(blank=True, default='', max_length=16)),
|
||||
('jmag', models.FloatField(default=0.0, null=True)),
|
||||
('e_jmag', models.FloatField(default=0.0, null=True)),
|
||||
('hmag', models.FloatField(default=0.0, null=True)),
|
||||
('e_hmag', models.FloatField(default=0.0, null=True)),
|
||||
('kmag', models.FloatField(default=0.0, null=True)),
|
||||
('e_kmag', models.FloatField(default=0.0, null=True)),
|
||||
('qkfg', models.CharField(blank=True, default='', max_length=3, null=True)),
|
||||
('rkfg', models.CharField(blank=True, default='', max_length=3, null=True)),
|
||||
('bkfg', models.CharField(blank=True, default='', max_length=3, null=True)),
|
||||
('ckfg', models.CharField(blank=True, default='', max_length=3, null=True)),
|
||||
('prox', models.FloatField(default=0.0, null=True)),
|
||||
('xflg', models.BooleanField(default=False, null=True)),
|
||||
('aflg', models.BooleanField(default=False, null=True)),
|
||||
('glon', models.FloatField(default=0.0)),
|
||||
('glat', models.FloatField(default=0.0)),
|
||||
],
|
||||
),
|
||||
]
|
38
astrobasis/migrations/0057_glimpse.py
Normal file
38
astrobasis/migrations/0057_glimpse.py
Normal file
@@ -0,0 +1,38 @@
|
||||
# Generated by Django 3.2.12 on 2022-03-05 18:03
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0056_twomass'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='GLIMPSE',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('healpix', models.BigIntegerField(db_index=True, default=0)),
|
||||
('ra', models.FloatField(default=0.0)),
|
||||
('dec', models.FloatField(default=0.0)),
|
||||
('error_radius', models.FloatField(default=0.5)),
|
||||
('name', models.CharField(blank=True, default='', max_length=17)),
|
||||
('twomass', models.CharField(blank=True, default='', max_length=16)),
|
||||
('jmag', models.FloatField(default=0.0, null=True)),
|
||||
('hmag', models.FloatField(default=0.0, null=True)),
|
||||
('kmag', models.FloatField(default=0.0, null=True)),
|
||||
('b1mag', models.FloatField(default=0.0, null=True)),
|
||||
('e_b1mag', models.FloatField(default=0.0, null=True)),
|
||||
('b2mag', models.FloatField(default=0.0, null=True)),
|
||||
('e_b2mag', models.FloatField(default=0.0, null=True)),
|
||||
('b3mag', models.FloatField(default=0.0, null=True)),
|
||||
('e_b3mag', models.FloatField(default=0.0, null=True)),
|
||||
('b4mag', models.FloatField(default=0.0, null=True)),
|
||||
('e_b4mag', models.FloatField(default=0.0, null=True)),
|
||||
('glon', models.FloatField(default=0.0)),
|
||||
('glat', models.FloatField(default=0.0)),
|
||||
],
|
||||
),
|
||||
]
|
18
astrobasis/migrations/0058_alter_glimpse_healpix.py
Normal file
18
astrobasis/migrations/0058_alter_glimpse_healpix.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 3.2.12 on 2022-03-15 08:05
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0057_glimpse'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='glimpse',
|
||||
name='healpix',
|
||||
field=models.BigIntegerField(db_index=True, default=0, null=True),
|
||||
),
|
||||
]
|
23
astrobasis/migrations/0059_auto_20220315_1125.py
Normal file
23
astrobasis/migrations/0059_auto_20220315_1125.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 3.2.12 on 2022-03-15 08:25
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0058_alter_glimpse_healpix'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='glimpse',
|
||||
name='glat',
|
||||
field=models.FloatField(default=0.0, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='glimpse',
|
||||
name='glon',
|
||||
field=models.FloatField(default=0.0, null=True),
|
||||
),
|
||||
]
|
17
astrobasis/migrations/0060_alter_glimpse_options.py
Normal file
17
astrobasis/migrations/0060_alter_glimpse_options.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# Generated by Django 3.2.12 on 2022-03-23 08:35
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0059_auto_20220315_1125'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='glimpse',
|
||||
options={'ordering': ['-id']},
|
||||
),
|
||||
]
|
28
astrobasis/migrations/0061_vlass.py
Normal file
28
astrobasis/migrations/0061_vlass.py
Normal file
@@ -0,0 +1,28 @@
|
||||
# Generated by Django 3.2.12 on 2022-03-25 14:18
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0060_alter_glimpse_options'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='VLASS',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('ra', models.FloatField(default=0.0)),
|
||||
('dec', models.FloatField(default=0.0)),
|
||||
('healpix', models.BigIntegerField(db_index=True, default=0)),
|
||||
('error_radius', models.FloatField(default=0.0)),
|
||||
('name', models.CharField(max_length=51, unique=True)),
|
||||
('ftot', models.FloatField(default=0.0)),
|
||||
('e_ftot', models.FloatField(default=0.0)),
|
||||
('fpeak', models.FloatField(default=0.0)),
|
||||
('e_fpeak', models.FloatField(default=0.0)),
|
||||
],
|
||||
),
|
||||
]
|
38
astrobasis/migrations/0062_auto_20220325_1731.py
Normal file
38
astrobasis/migrations/0062_auto_20220325_1731.py
Normal file
@@ -0,0 +1,38 @@
|
||||
# Generated by Django 3.2.12 on 2022-03-25 14:31
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0061_vlass'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='vlass',
|
||||
name='dec_m',
|
||||
field=models.FloatField(default=0.0),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='vlass',
|
||||
name='e_dec',
|
||||
field=models.FloatField(default=0.0),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='vlass',
|
||||
name='e_ra',
|
||||
field=models.FloatField(default=0.0),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='vlass',
|
||||
name='ra_m',
|
||||
field=models.FloatField(default=0.0),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='vlass',
|
||||
name='name',
|
||||
field=models.CharField(max_length=31, unique=True),
|
||||
),
|
||||
]
|
28
astrobasis/migrations/0063_auto_20220325_1742.py
Normal file
28
astrobasis/migrations/0063_auto_20220325_1742.py
Normal file
@@ -0,0 +1,28 @@
|
||||
# Generated by Django 3.2.12 on 2022-03-25 14:42
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0062_auto_20220325_1731'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='vlass',
|
||||
name='dupflag',
|
||||
field=models.IntegerField(default=0),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='vlass',
|
||||
name='qualflag',
|
||||
field=models.IntegerField(default=0),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='vlass',
|
||||
name='name',
|
||||
field=models.CharField(max_length=31),
|
||||
),
|
||||
]
|
23
astrobasis/migrations/0064_auto_20220325_1752.py
Normal file
23
astrobasis/migrations/0064_auto_20220325_1752.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 3.2.12 on 2022-03-25 14:52
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0063_auto_20220325_1742'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='vlass',
|
||||
name='glat',
|
||||
field=models.FloatField(default=0.0),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='vlass',
|
||||
name='glon',
|
||||
field=models.FloatField(default=0.0),
|
||||
),
|
||||
]
|
25
astrobasis/migrations/0065_auto_20220330_1313.py
Normal file
25
astrobasis/migrations/0065_auto_20220330_1313.py
Normal file
@@ -0,0 +1,25 @@
|
||||
# Generated by Django 3.2.12 on 2022-03-30 10:13
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0064_auto_20220325_1752'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='first',
|
||||
options={'ordering': ['-id']},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='sumss',
|
||||
options={'ordering': ['-id']},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='vlass',
|
||||
options={'ordering': ['-id']},
|
||||
),
|
||||
]
|
18
astrobasis/migrations/0066_alter_twomass_name.py
Normal file
18
astrobasis/migrations/0066_alter_twomass_name.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 3.2.12 on 2022-03-31 10:02
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0065_auto_20220330_1313'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='twomass',
|
||||
name='name',
|
||||
field=models.CharField(blank=True, default='', max_length=17),
|
||||
),
|
||||
]
|
39
astrobasis/migrations/0067_vlassfromvizier.py
Normal file
39
astrobasis/migrations/0067_vlassfromvizier.py
Normal file
@@ -0,0 +1,39 @@
|
||||
# Generated by Django 3.2.12 on 2022-04-04 13:29
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0066_alter_twomass_name'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='VLASSfromVizieR',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('glon', models.FloatField(default=0.0)),
|
||||
('glat', models.FloatField(default=0.0)),
|
||||
('ra', models.FloatField(default=0.0)),
|
||||
('dec', models.FloatField(default=0.0)),
|
||||
('e_ra', models.FloatField(default=0.0)),
|
||||
('e_dec', models.FloatField(default=0.0)),
|
||||
('ra_m', models.FloatField(default=0.0)),
|
||||
('dec_m', models.FloatField(default=0.0)),
|
||||
('healpix', models.BigIntegerField(db_index=True, default=0)),
|
||||
('error_radius', models.FloatField(default=0.0)),
|
||||
('name', models.CharField(max_length=31)),
|
||||
('ftot', models.FloatField(default=0.0)),
|
||||
('e_ftot', models.FloatField(default=0.0)),
|
||||
('fpeak', models.FloatField(default=0.0)),
|
||||
('e_fpeak', models.FloatField(default=0.0)),
|
||||
('dupflag', models.IntegerField(default=0)),
|
||||
('qualflag', models.IntegerField(default=0)),
|
||||
],
|
||||
options={
|
||||
'ordering': ['-id'],
|
||||
},
|
||||
),
|
||||
]
|
21
astrobasis/migrations/0068_auto_20220404_1639.py
Normal file
21
astrobasis/migrations/0068_auto_20220404_1639.py
Normal file
@@ -0,0 +1,21 @@
|
||||
# Generated by Django 3.2.12 on 2022-04-04 13:39
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0067_vlassfromvizier'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='vlassfromvizier',
|
||||
name='dec_m',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='vlassfromvizier',
|
||||
name='ra_m',
|
||||
),
|
||||
]
|
18
astrobasis/migrations/0069_vlassfromvizier_recno.py
Normal file
18
astrobasis/migrations/0069_vlassfromvizier_recno.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 3.2.12 on 2022-04-04 16:40
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0068_auto_20220404_1639'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='vlassfromvizier',
|
||||
name='recno',
|
||||
field=models.IntegerField(default=0),
|
||||
),
|
||||
]
|
17
astrobasis/migrations/0070_alter_twomass_options.py
Normal file
17
astrobasis/migrations/0070_alter_twomass_options.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# Generated by Django 3.2.12 on 2022-04-07 14:17
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0069_vlassfromvizier_recno'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='twomass',
|
||||
options={'ordering': ['-id']},
|
||||
),
|
||||
]
|
30
astrobasis/migrations/0071_astrobasisusercat.py
Normal file
30
astrobasis/migrations/0071_astrobasisusercat.py
Normal file
@@ -0,0 +1,30 @@
|
||||
# Generated by Django 3.2.13 on 2022-06-09 14:20
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0070_alter_twomass_options'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='AstroBasisUserCat',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('ra', models.FloatField(default=0.0)),
|
||||
('dec', models.FloatField(default=0.0)),
|
||||
('healpix', models.BigIntegerField(db_index=True, default=0)),
|
||||
('error_radius', models.FloatField(default=0.0)),
|
||||
('name', models.CharField(max_length=51, unique=True)),
|
||||
('notes', models.TextField(blank=True, max_length=2000, null=True, verbose_name='notes')),
|
||||
('bibcode', models.CharField(blank=True, default='', max_length=36)),
|
||||
('autoname', models.BooleanField(default=False, help_text='Generate IAU name of the component in the form <b>NAME JHHMMSS.s+DDMMSS</b>, <br>where NAME is taken from the corresponding field above.')),
|
||||
],
|
||||
options={
|
||||
'ordering': ['-id'],
|
||||
},
|
||||
),
|
||||
]
|
16
astrobasis/migrations/0072_delete_astrobasisusercat.py
Normal file
16
astrobasis/migrations/0072_delete_astrobasisusercat.py
Normal file
@@ -0,0 +1,16 @@
|
||||
# Generated by Django 3.2.13 on 2022-06-09 14:37
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0071_astrobasisusercat'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.DeleteModel(
|
||||
name='AstroBasisUserCat',
|
||||
),
|
||||
]
|
30
astrobasis/migrations/0073_astrobasisusercat.py
Normal file
30
astrobasis/migrations/0073_astrobasisusercat.py
Normal file
@@ -0,0 +1,30 @@
|
||||
# Generated by Django 3.2.13 on 2022-06-10 15:24
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0072_delete_astrobasisusercat'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='AstroBasisUserCat',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('ra', models.FloatField(default=0.0)),
|
||||
('dec', models.FloatField(default=0.0)),
|
||||
('healpix', models.BigIntegerField(db_index=True, default=0)),
|
||||
('error_radius', models.FloatField(default=0.0)),
|
||||
('name', models.CharField(max_length=51, unique=True)),
|
||||
('notes', models.TextField(blank=True, max_length=2000, null=True, verbose_name='notes')),
|
||||
('bibcode', models.CharField(blank=True, default='', max_length=36)),
|
||||
('autoname', models.BooleanField(default=False, help_text='Generate IAU name of the component in the form <b>NAME JHHMMSS.s+DDMMSS</b>, <br>where NAME is taken from the corresponding field above.')),
|
||||
],
|
||||
options={
|
||||
'ordering': ['-id'],
|
||||
},
|
||||
),
|
||||
]
|
24
astrobasis/migrations/0074_magnitude.py
Normal file
24
astrobasis/migrations/0074_magnitude.py
Normal file
@@ -0,0 +1,24 @@
|
||||
# Generated by Django 3.2.13 on 2022-06-13 13:57
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0073_astrobasisusercat'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Magnitude',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('magn', models.FloatField(default=0.0)),
|
||||
('band', models.CharField(choices=[('U', 'U'), ('B', 'B'), ('V', 'V'), ('R', 'R'), ('I', 'I'), ('Z', 'Z'), ('Y', 'Y'), ('', 'J'), ('H', 'H'), ('K', 'K'), ('Ks', 'Ks'), ('Br_gamma', 'Br_gamma'), ('u', 'u'), ('g', 'g'), ('r', 'r'), ('i', 'i'), ('z', 'z'), ('y', 'y'), ('G', 'G'), ('Gbr', 'Gbr'), ('Grp', 'Grp'), ('I1', 'I1'), ('I2', 'I2'), ('I3', 'I3'), ('I4', 'I4'), ('MIPS.24mu', 'MIPS.24mu'), ('MIPS.70mu', 'MIPS.70mu'), ('MIPS.160mu', 'MIPS.160mu'), ('W1', 'W1'), ('W2', 'W2'), ('W3', 'W3'), ('W4', 'W4')], default='W1', max_length=10)),
|
||||
],
|
||||
options={
|
||||
'verbose_name_plural': 'Magnitudes',
|
||||
},
|
||||
),
|
||||
]
|
18
astrobasis/migrations/0075_astrobasisusercat_magnitudes.py
Normal file
18
astrobasis/migrations/0075_astrobasisusercat_magnitudes.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 3.2.13 on 2022-06-13 13:59
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0074_magnitude'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='astrobasisusercat',
|
||||
name='magnitudes',
|
||||
field=models.ManyToManyField(to='astrobasis.Magnitude'),
|
||||
),
|
||||
]
|
18
astrobasis/migrations/0076_magnitude_error.py
Normal file
18
astrobasis/migrations/0076_magnitude_error.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 3.2.13 on 2022-06-14 14:13
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0075_astrobasisusercat_magnitudes'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='magnitude',
|
||||
name='error',
|
||||
field=models.FloatField(default=0.0),
|
||||
),
|
||||
]
|
18
astrobasis/migrations/0077_alter_magnitude_band.py
Normal file
18
astrobasis/migrations/0077_alter_magnitude_band.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 3.2.13 on 2022-06-24 15:26
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0076_magnitude_error'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='magnitude',
|
||||
name='band',
|
||||
field=models.CharField(choices=[('U', 'U'), ('B', 'B'), ('V', 'V'), ('R', 'R'), ('I', 'I'), ('Z', 'Z'), ('Y', 'Y'), ('J', 'J'), ('H', 'H'), ('K', 'K'), ('Ks', 'Ks'), ('Br_gamma', 'Br_gamma'), ('u', 'u'), ('g', 'g'), ('r', 'r'), ('Halpha', 'Halpha'), ('i', 'i'), ('z', 'z'), ('y', 'y'), ('G', 'G'), ('Gbr', 'Gbr'), ('Grp', 'Grp'), ('I1', 'I1'), ('I2', 'I2'), ('I3', 'I3'), ('I4', 'I4'), ('MIPS.24mu', 'MIPS.24mu'), ('MIPS.70mu', 'MIPS.70mu'), ('MIPS.160mu', 'MIPS.160mu'), ('W1', 'W1'), ('W2', 'W2'), ('W3', 'W3'), ('W4', 'W4')], default='W1', max_length=10),
|
||||
),
|
||||
]
|
18
astrobasis/migrations/0078_alter_simbad_obj_class.py
Normal file
18
astrobasis/migrations/0078_alter_simbad_obj_class.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 3.2.13 on 2022-07-01 20:38
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('astrobasis', '0077_alter_magnitude_band'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='simbad',
|
||||
name='obj_class',
|
||||
field=models.CharField(default='', max_length=30),
|
||||
),
|
||||
]
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user