Display a ZTF Object

This notebook replicates the information and plots that can be found on the ZTF web page for an object. Given the object name, we fetch its JSON data package, then unpack it to show the contents, and make two plots: the light curve and the positions of the detections.

We use wget to fetch the data packet for the object ZTF17aaafido Click on the link to see how Lasair represents the data.

In [60]:
import os
import json
objectId = 'ZTF17aaafido'
file = objectId + '.json'
os.system('wget -O %s.json https://lasair.roe.ac.uk/object/%s/json/' % (objectId, objectId))
data = json.loads(open(file).read())

There are three sections in the package:

  • objectData, a dictionary of properties of the object
  • crossmatches, a list of dictionaries, each being a possible catalogue object, where the rank shows which is the most likely identification, 1 being best.
  • candidates, a list of dictionaries, each being a detection of the object.

In the following, we write out all this data so you can see what is in the package:

In [61]:
print ('Object Data')
print ('-----------')
for key,value in data['objectData'].items():
    print(key +' = '+ str(value))
    
print ('\nCrossmatches')
print ('-----------')
for crossmatch in data['crossmatches']:
    for key,value in crossmatch.items():
        print(key +' = '+ str(value))
    print()
        
print ('\nCandidates')
print ('-----------')
for candidate in data['candidates']:
    for key,value in candidate.items():
        print(key +' = '+ str(value))
    print()
Object Data
-----------
primaryId = 1241243
ncand = 96
ramean = 28.709203052083335
decmean = 51.42238327916667
glonmean = 132.897264838
glatmean = -10.2185006261
classification = VS
annotation = The transient is synonymous with <em>359504980472540672/01545020+51</em>; a B=15.83 mag stellar source found in the GAIA/2MASS/GSC catalogues. It's located 0.1 arcsec from the stellar source core.
separationArcsec = 0.05429033767920155

Crossmatches
-----------
catalogue_object_id = 359504980472540672/01545020+51
catalogue_table_name = GAIA/2MASS/GSC
catalogue_object_type = star
separationArcsec = 0.05429033767920155
r = None
g = None
photoZ = None
rank = 1

catalogue_object_id = 359504980472540672
catalogue_table_name = Gaia DR1
catalogue_object_type = star
separationArcsec = 0.05429033767920155
r = None
g = None
photoZ = None
rank = None

catalogue_object_id = 01545020+5125207 
catalogue_table_name = 2MASS PSC
catalogue_object_type = star
separationArcsec = 0.14893415036234248
r = None
g = None
photoZ = None
rank = None

catalogue_object_id = NBYY021191
catalogue_table_name = GSC v2.3
catalogue_object_type = star
separationArcsec = 0.17305130432826202
r = None
g = None
photoZ = None
rank = None


Candidates
-----------
candid = 701296800615015006
jd = 2458455.7968056
ra = 28.7090847
decl = 51.4223464
fid = 2
nid = 701
magpsf = 17.325
sigmapsf = 0.0478727
ssdistnr = -999.0
ssnamenr = null
utc = 2018-12-03 07:07:24

candid = 701268960615010003
jd = 2458455.7689699
ra = 28.709031
decl = 51.42256
fid = 2
nid = 701
magpsf = 17.4294
sigmapsf = 0.061111
ssdistnr = -999.0
ssnamenr = null
utc = 2018-12-03 06:27:18

candid = 696259310615015013
jd = 2458450.7593171
ra = 28.7091941
decl = 51.4223717
fid = 1
nid = 696
magpsf = 17.0553
sigmapsf = 0.051819
ssdistnr = -999.0
ssnamenr = null
utc = 2018-11-28 06:13:24

candid = 696258866015015001
jd = 2458450.7588657
ra = 28.7091756
decl = 51.4223302
fid = 1
nid = 696
magpsf = 16.966
sigmapsf = 0.111923
ssdistnr = -999.0
ssnamenr = null
utc = 2018-11-28 06:12:45

candid = 695337290615010026
jd = 2458449.8372917
ra = 28.7092439
decl = 51.4224595
fid = 2
nid = 695
magpsf = 16.1117
sigmapsf = 0.101066
ssdistnr = -999.0
ssnamenr = null
utc = 2018-11-27 08:05:42

candid = 689214540615010005
jd = 2458443.7145486
ra = 28.7091842
decl = 51.4224292
fid = 1
nid = 689
magpsf = 16.9452
sigmapsf = 0.0283809
ssdistnr = -999.0
ssnamenr = null
utc = 2018-11-21 05:08:56

candid = 688259620615015201
jd = 2458442.7596296
ra = 28.7091816
decl = 51.4223453
fid = 2
nid = 688
magpsf = 16.2079
sigmapsf = 0.0251405
ssdistnr = -999.0
ssnamenr = null
utc = 2018-11-20 06:13:51

candid = 687297260615010006
jd = 2458441.7972685
ra = 28.7092347
decl = 51.4223834
fid = 2
nid = 687
magpsf = 16.1895
sigmapsf = 0.0292552
ssdistnr = -999.0
ssnamenr = null
utc = 2018-11-19 07:08:03

candid = 687264846015015000
jd = 2458441.7648495
ra = 28.7092603
decl = 51.4222731
fid = 1
nid = 687
magpsf = 17.6792
sigmapsf = 0.17738
ssdistnr = -999.0
ssnamenr = null
utc = 2018-11-19 06:21:22

candid = 684362610615010006
jd = 2458438.8626157
ra = 28.7091447
decl = 51.4224367
fid = 1
nid = 684
magpsf = 16.9728
sigmapsf = 0.150506
ssdistnr = -999.0
ssnamenr = null
utc = 2018-11-16 08:42:09

jd = 2458437.80328
fid = 2
diffmaglim = 20.348
utc = 2018-11-15 07:16:43
magpsf = 20.348

candid = 683241360615015008
jd = 2458437.7413657
ra = 28.709188
decl = 51.4223579
fid = 1
nid = 683
magpsf = 17.4087
sigmapsf = 0.0262762
ssdistnr = -999.0
ssnamenr = null
utc = 2018-11-15 05:47:33

candid = 682255180615010004
jd = 2458436.7551852
ra = 28.7092147
decl = 51.4224072
fid = 2
nid = 682
magpsf = 15.9335
sigmapsf = 0.0634637
ssdistnr = -999.0
ssnamenr = null
utc = 2018-11-14 06:07:28

candid = 682237110615010005
jd = 2458436.7371181
ra = 28.7092406
decl = 51.4224167
fid = 1
nid = 682
magpsf = 17.5192
sigmapsf = 0.0361852
ssdistnr = -999.0
ssnamenr = null
utc = 2018-11-14 05:41:27

candid = 680261370615015025
jd = 2458434.7613773
ra = 28.7091724
decl = 51.4223544
fid = 1
nid = 680
magpsf = 16.8616
sigmapsf = 0.0229886
ssdistnr = -999.0
ssnamenr = null
utc = 2018-11-12 06:16:22

jd = 2458434.70091
fid = 2
diffmaglim = 19.716
utc = 2018-11-12 04:49:18
magpsf = 19.716

jd = 2458434.70045
fid = 2
diffmaglim = 20.07
utc = 2018-11-12 04:48:38
magpsf = 20.07

jd = 2458432.7627
fid = 2
diffmaglim = 20.118
utc = 2018-11-10 06:18:17
magpsf = 20.118

candid = 678235830615010012
jd = 2458432.7358333
ra = 28.7092495
decl = 51.42247
fid = 1
nid = 678
magpsf = 17.5323
sigmapsf = 0.0439232
ssdistnr = -999.0
ssnamenr = null
utc = 2018-11-10 05:39:35

jd = 2458431.7472
fid = 1
diffmaglim = 19.82
utc = 2018-11-09 05:55:58
magpsf = 19.82

jd = 2458431.74397
fid = 1
diffmaglim = 20.17
utc = 2018-11-09 05:51:19
magpsf = 20.17

candid = 677198850615010007
jd = 2458431.6988542
ra = 28.7092287
decl = 51.4223772
fid = 2
nid = 677
magpsf = 16.5173
sigmapsf = 0.0272044
ssdistnr = -999.0
ssnamenr = null
utc = 2018-11-09 04:46:21

jd = 2458431.69781
fid = 2
diffmaglim = 19.368
utc = 2018-11-09 04:44:50
magpsf = 19.368

candid = 676257990615015006
jd = 2458430.7579977
ra = 28.709218
decl = 51.4223365
fid = 1
nid = 676
magpsf = 17.3668
sigmapsf = 0.0283181
ssdistnr = -999.0
ssnamenr = null
utc = 2018-11-08 06:11:31

jd = 2458430.70007
fid = 2
diffmaglim = 20.382
utc = 2018-11-08 04:48:06
magpsf = 20.382

candid = 675240640615015015
jd = 2458429.7406481
ra = 28.7092647
decl = 51.422323
fid = 1
nid = 675
magpsf = 17.5758
sigmapsf = 0.0252514
ssdistnr = -999.0
ssnamenr = null
utc = 2018-11-07 05:46:31

jd = 2458428.76211
fid = 2
diffmaglim = 20.391
utc = 2018-11-06 06:17:26
magpsf = 20.391

candid = 674261650615010017
jd = 2458428.7616551
ra = 28.7092213
decl = 51.4224423
fid = 2
nid = 674
magpsf = 16.1293
sigmapsf = 0.0302085
ssdistnr = -999.0
ssnamenr = null
utc = 2018-11-06 06:16:47

candid = 674223760615010005
jd = 2458428.7237616
ra = 28.7090998
decl = 51.4224468
fid = 1
nid = 674
magpsf = 18.1159
sigmapsf = 0.03245
ssdistnr = -999.0
ssnamenr = null
utc = 2018-11-06 05:22:13

candid = 673294270615015094
jd = 2458427.7942708
ra = 28.7092343
decl = 51.4222989
fid = 1
nid = 673
magpsf = 16.8811
sigmapsf = 0.0316637
ssdistnr = -999.0
ssnamenr = null
utc = 2018-11-05 07:03:44

jd = 2458427.75353
fid = 2
diffmaglim = 18.96
utc = 2018-11-05 06:05:04
magpsf = 18.96

candid = 672320050615010008
jd = 2458426.8200579
ra = 28.7092093
decl = 51.4224418
fid = 1
nid = 672
magpsf = 17.2187
sigmapsf = 0.0373193
ssdistnr = -999.0
ssnamenr = null
utc = 2018-11-04 07:40:53

candid = 672262650615015009
jd = 2458426.7626505
ra = 28.7092652
decl = 51.4223292
fid = 2
nid = 672
magpsf = 16.6712
sigmapsf = 0.0298272
ssdistnr = -999.0
ssnamenr = null
utc = 2018-11-04 06:18:13

candid = 672262650615015010
jd = 2458426.7626505
ra = 28.7092801
decl = 51.4222881
fid = 2
nid = 672
magpsf = 16.8134
sigmapsf = 0.0326327
ssdistnr = -999.0
ssnamenr = null
utc = 2018-11-04 06:18:13

jd = 2458425.83688
fid = 1
diffmaglim = 20.193
utc = 2018-11-03 08:05:06
magpsf = 20.193

jd = 2458425.83641
fid = 1
diffmaglim = 20.631
utc = 2018-11-03 08:04:25
magpsf = 20.631

jd = 2458425.77359
fid = 2
diffmaglim = 20.112
utc = 2018-11-03 06:33:58
magpsf = 20.112

jd = 2458425.73624
fid = 2
diffmaglim = 19.138
utc = 2018-11-03 05:40:11
magpsf = 19.138

candid = 670247520615010000
jd = 2458424.7475231
ra = 28.709224
decl = 51.4224124
fid = 2
nid = 670
magpsf = 16.022
sigmapsf = 0.0571855
ssdistnr = -999.0
ssnamenr = null
utc = 2018-11-02 05:56:25

candid = 670193660615015018
jd = 2458424.693669
ra = 28.709021
decl = 51.4222476
fid = 1
nid = 670
magpsf = 17.5613
sigmapsf = 0.0807153
ssdistnr = -999.0
ssnamenr = null
utc = 2018-11-02 04:38:53

jd = 2458423.79644
fid = 2
diffmaglim = 19.961
utc = 2018-11-01 07:06:52
magpsf = 19.961

candid = 668323580615010055
jd = 2458422.823588
ra = 28.7092404
decl = 51.42241
fid = 2
nid = 668
magpsf = 16.0525
sigmapsf = 0.0328277
ssdistnr = -999.0
ssnamenr = null
utc = 2018-10-31 07:45:58

candid = 643430020615010004
jd = 2458397.9300231
ra = 28.709234
decl = 51.4224131
fid = 2
nid = 643
magpsf = 16.2098
sigmapsf = 0.0173391
ssdistnr = -999.0
ssnamenr = null
utc = 2018-10-06 10:19:13

candid = 643365386015015000
jd = 2458397.8653819
ra = 28.7091482
decl = 51.4223552
fid = 1
nid = 643
magpsf = 17.179
sigmapsf = 0.144732
ssdistnr = -999.0
ssnamenr = null
utc = 2018-10-06 08:46:08

candid = 643353960615015042
jd = 2458397.8539699
ra = 28.7091971
decl = 51.4223682
fid = 1
nid = 643
magpsf = 16.9443
sigmapsf = 0.0265158
ssdistnr = -999.0
ssnamenr = null
utc = 2018-10-06 08:29:42

candid = 636321650615010005
jd = 2458390.8216551
ra = 28.7091742
decl = 51.4225091
fid = 1
nid = 636
magpsf = 18.3566
sigmapsf = 0.118013
ssdistnr = -999.0
ssnamenr = null
utc = 2018-09-29 07:43:11

candid = 634399900615010007
jd = 2458388.8999074
ra = 28.7091935
decl = 51.4224763
fid = 1
nid = 634
magpsf = 17.3736
sigmapsf = 0.0899775
ssdistnr = -999.0
ssnamenr = null
utc = 2018-09-27 09:35:51

candid = 634283750615015010
jd = 2458388.78375
ra = 28.7092787
decl = 51.4223422
fid = 2
nid = 634
magpsf = 16.6966
sigmapsf = 0.0454377
ssdistnr = -999.0
ssnamenr = null
utc = 2018-09-27 06:48:35

candid = 633280380615015007
jd = 2458387.7803819
ra = 28.7092319
decl = 51.4223762
fid = 1
nid = 633
magpsf = 17.1787
sigmapsf = 0.0615285
ssdistnr = -999.0
ssnamenr = null
utc = 2018-09-26 06:43:44

candid = 630463170615015012
jd = 2458384.9631713
ra = 28.7092063
decl = 51.4223542
fid = 1
nid = 630
magpsf = 17.013
sigmapsf = 0.0430143
ssdistnr = -999.0
ssnamenr = null
utc = 2018-09-23 11:06:58

candid = 629453270615015011
jd = 2458383.9532755
ra = 28.7092457
decl = 51.4223198
fid = 1
nid = 629
magpsf = 17.4176
sigmapsf = 0.056055
ssdistnr = -999.0
ssnamenr = null
utc = 2018-09-22 10:52:43

candid = 628450030615010011
jd = 2458382.9500347
ra = 28.7091989
decl = 51.4224367
fid = 1
nid = 628
magpsf = 17.1161
sigmapsf = 0.073777
ssdistnr = -999.0
ssnamenr = null
utc = 2018-09-21 10:48:02

candid = 626428790615015026
jd = 2458380.9287963
ra = 28.7092742
decl = 51.4222286
fid = 2
nid = 626
magpsf = 17.2386
sigmapsf = 0.0508878
ssdistnr = -999.0
ssnamenr = null
utc = 2018-09-19 10:17:28

candid = 625451590615015012
jd = 2458379.9515972
ra = 28.7091696
decl = 51.4224533
fid = 1
nid = 625
magpsf = 17.862
sigmapsf = 0.0501679
ssdistnr = -999.0
ssnamenr = null
utc = 2018-09-18 10:50:17

candid = 624456270615010006
jd = 2458378.9562731
ra = 28.709201
decl = 51.4223843
fid = 1
nid = 624
magpsf = 16.8673
sigmapsf = 0.0176547
ssdistnr = -999.0
ssnamenr = null
utc = 2018-09-17 10:57:01

candid = 622451480615015004
jd = 2458376.9514815
ra = 28.7091946
decl = 51.4224239
fid = 1
nid = 622
magpsf = 17.0517
sigmapsf = 0.0308026
ssdistnr = -999.0
ssnamenr = null
utc = 2018-09-15 10:50:08

candid = 619455570615015015
jd = 2458373.9555787
ra = 28.709146
decl = 51.4223091
fid = 2
nid = 619
magpsf = 18.079
sigmapsf = 0.0775169
ssdistnr = -999.0
ssnamenr = null
utc = 2018-09-12 10:56:01

candid = 619399950615010060
jd = 2458373.8999537
ra = 28.7092146
decl = 51.4223761
fid = 1
nid = 619
magpsf = 17.1294
sigmapsf = 0.0329395
ssdistnr = -999.0
ssnamenr = null
utc = 2018-09-12 09:35:55

candid = 618383810615010012
jd = 2458372.8838194
ra = 28.7092474
decl = 51.4224055
fid = 2
nid = 618
magpsf = 16.6003
sigmapsf = 0.0384975
ssdistnr = -999.0
ssnamenr = null
utc = 2018-09-11 09:12:41

candid = 617388490615015012
jd = 2458371.8884954
ra = 28.7092508
decl = 51.4224383
fid = 1
nid = 617
magpsf = 17.216
sigmapsf = 0.0385166
ssdistnr = -999.0
ssnamenr = null
utc = 2018-09-10 09:19:26

candid = 616426300615010014
jd = 2458370.9263079
ra = 28.70924
decl = 51.4224118
fid = 2
nid = 616
magpsf = 16.5863
sigmapsf = 0.0347894
ssdistnr = -999.0
ssnamenr = null
utc = 2018-09-09 10:13:53

candid = 616381720615015013
jd = 2458370.8817245
ra = 28.709176
decl = 51.4223031
fid = 1
nid = 616
magpsf = 17.3752
sigmapsf = 0.0488505
ssdistnr = -999.0
ssnamenr = null
utc = 2018-09-09 09:09:40

candid = 614415430615015020
jd = 2458368.9154398
ra = 28.7093004
decl = 51.4223885
fid = 1
nid = 614
magpsf = 17.2309
sigmapsf = 0.0461022
ssdistnr = -999.0
ssnamenr = null
utc = 2018-09-07 09:58:13

candid = 613412330615015011
jd = 2458367.912338
ra = 28.7092476
decl = 51.4223883
fid = 1
nid = 613
magpsf = 16.9932
sigmapsf = 0.0422272
ssdistnr = -999.0
ssnamenr = null
utc = 2018-09-06 09:53:46

candid = 613386850615015174
jd = 2458367.8868519
ra = 28.7091872
decl = 51.4223389
fid = 2
nid = 613
magpsf = 16.7033
sigmapsf = 0.0415696
ssdistnr = -999.0
ssnamenr = null
utc = 2018-09-06 09:17:04

candid = 612382320615015029
jd = 2458366.8823264
ra = 28.7091089
decl = 51.4223353
fid = 2
nid = 612
magpsf = 16.8427
sigmapsf = 0.0737664
ssdistnr = -999.0
ssnamenr = null
utc = 2018-09-05 09:10:33

candid = 611399660615010005
jd = 2458365.8996644
ra = 28.7091952
decl = 51.4224176
fid = 1
nid = 611
magpsf = 17.0669
sigmapsf = 0.0381313
ssdistnr = -999.0
ssnamenr = null
utc = 2018-09-04 09:35:31

candid = 610409860615015008
jd = 2458364.9098611
ra = 28.709112
decl = 51.4223332
fid = 1
nid = 610
magpsf = 17.5136
sigmapsf = 0.0508481
ssdistnr = -999.0
ssnamenr = null
utc = 2018-09-03 09:50:11

candid = 610381880615010004
jd = 2458364.8818866
ra = 28.7091448
decl = 51.4224213
fid = 2
nid = 610
magpsf = 17.0148
sigmapsf = 0.0920404
ssdistnr = -999.0
ssnamenr = null
utc = 2018-09-03 09:09:55

candid = 609407870615015009
jd = 2458363.9078704
ra = 28.7091986
decl = 51.4224004
fid = 1
nid = 609
magpsf = 16.8787
sigmapsf = 0.0609325
ssdistnr = -999.0
ssnamenr = null
utc = 2018-09-02 09:47:20

candid = 607487060615015019
jd = 2458361.9870602
ra = 28.7092231
decl = 51.4223504
fid = 2
nid = 607
magpsf = 16.6088
sigmapsf = 0.0415071
ssdistnr = -999.0
ssnamenr = null
utc = 2018-08-31 11:41:22

candid = 607473980615015011
jd = 2458361.9739815
ra = 28.7092419
decl = 51.4223904
fid = 1
nid = 607
magpsf = 16.7998
sigmapsf = 0.0418372
ssdistnr = -999.0
ssnamenr = null
utc = 2018-08-31 11:22:32

candid = 606450110615015009
jd = 2458360.9501157
ra = 28.7092206
decl = 51.422328
fid = 1
nid = 606
magpsf = 16.8326
sigmapsf = 0.0381428
ssdistnr = -999.0
ssnamenr = null
utc = 2018-08-30 10:48:09

candid = 606339220615010005
jd = 2458360.8392245
ra = 28.7091877
decl = 51.4224232
fid = 2
nid = 606
magpsf = 16.1084
sigmapsf = 0.0320492
ssdistnr = -999.0
ssnamenr = null
utc = 2018-08-30 08:08:28

candid = 604422740615010008
jd = 2458358.9227431
ra = 28.7092072
decl = 51.4224372
fid = 2
nid = 604
magpsf = 16.4296
sigmapsf = 0.0314584
ssdistnr = -999.0
ssnamenr = null
utc = 2018-08-28 10:08:45

candid = 601503880615010004
jd = 2458356.0038889
ra = 28.7092835
decl = 51.4224162
fid = 2
nid = 601
magpsf = 17.1879
sigmapsf = 0.0472787
ssdistnr = -999.0
ssnamenr = null
utc = 2018-08-25 12:05:36

candid = 598420540615015081
jd = 2458352.920544
ra = 28.7092369
decl = 51.4223898
fid = 1
nid = 598
magpsf = 16.8097
sigmapsf = 0.0336354
ssdistnr = -999.0
ssnamenr = null
utc = 2018-08-22 10:05:35

candid = 597482230615010014
jd = 2458351.9822338
ra = 28.709198
decl = 51.4223943
fid = 2
nid = 597
magpsf = 16.2434
sigmapsf = 0.0475408
ssdistnr = -999.0
ssnamenr = null
utc = 2018-08-21 11:34:25

candid = 596402960615010031
jd = 2458350.902963
ra = 28.7093117
decl = 51.4224284
fid = 2
nid = 596
magpsf = 17.0815
sigmapsf = 0.0689113
ssdistnr = -999.0
ssnamenr = null
utc = 2018-08-20 09:40:16

candid = 595470120615015011
jd = 2458349.9701273
ra = 28.7091749
decl = 51.4223524
fid = 2
nid = 595
magpsf = 16.7908
sigmapsf = 0.046742
ssdistnr = -999.0
ssnamenr = null
utc = 2018-08-19 11:16:58

candid = 594469180615015035
jd = 2458348.9691898
ra = 28.7092649
decl = 51.4224064
fid = 1
nid = 594
magpsf = 17.6184
sigmapsf = 0.0440983
ssdistnr = -999.0
ssnamenr = null
utc = 2018-08-18 11:15:37

candid = 594443630615015017
jd = 2458348.9436343
ra = 28.7092352
decl = 51.422411
fid = 2
nid = 594
magpsf = 16.8704
sigmapsf = 0.0729628
ssdistnr = -999.0
ssnamenr = null
utc = 2018-08-18 10:38:50

candid = 593445310615010011
jd = 2458347.9453125
ra = 28.7091984
decl = 51.4224502
fid = 2
nid = 593
magpsf = 16.7824
sigmapsf = 0.0882662
ssdistnr = -999.0
ssnamenr = null
utc = 2018-08-17 10:41:15

candid = 592464090615015035
jd = 2458346.9640972
ra = 28.7091479
decl = 51.4224566
fid = 1
nid = 592
magpsf = 17.7073
sigmapsf = 0.0445348
ssdistnr = -999.0
ssnamenr = null
utc = 2018-08-16 11:08:17

candid = 591443860615015022
jd = 2458345.9438657
ra = 28.7092492
decl = 51.4223672
fid = 1
nid = 591
magpsf = 17.1244
sigmapsf = 0.0429934
ssdistnr = -999.0
ssnamenr = null
utc = 2018-08-15 10:39:09

candid = 590405100615015103
jd = 2458344.9051042
ra = 28.709218
decl = 51.4224108
fid = 1
nid = 590
magpsf = 16.924
sigmapsf = 0.0553211
ssdistnr = -999.0
ssnamenr = null
utc = 2018-08-14 09:43:21

candid = 589470480615010010
jd = 2458343.9704861
ra = 28.7093088
decl = 51.4224028
fid = 2
nid = 589
magpsf = 16.201
sigmapsf = 0.0310867
ssdistnr = -999.0
ssnamenr = null
utc = 2018-08-13 11:17:29

candid = 589451840615010005
jd = 2458343.9518403
ra = 28.7091406
decl = 51.4223389
fid = 1
nid = 589
magpsf = 17.4578
sigmapsf = 0.0320874
ssdistnr = -999.0
ssnamenr = null
utc = 2018-08-13 10:50:39

candid = 588468930615015022
jd = 2458342.9689352
ra = 28.7088936
decl = 51.422334
fid = 2
nid = 588
magpsf = 17.9299
sigmapsf = 0.0757152
ssdistnr = -999.0
ssnamenr = null
utc = 2018-08-12 11:15:16

candid = 584470810615015014
jd = 2458338.9708102
ra = 28.7091254
decl = 51.422427
fid = 2
nid = 584
magpsf = 17.4649
sigmapsf = 0.0740151
ssdistnr = -999.0
ssnamenr = null
utc = 2018-08-08 11:17:58

candid = 584400770615010003
jd = 2458338.9007755
ra = 28.7091746
decl = 51.4224162
fid = 1
nid = 584
magpsf = 17.1274
sigmapsf = 0.0263346
ssdistnr = -999.0
ssnamenr = null
utc = 2018-08-08 09:37:07

candid = 584400770615010004
jd = 2458338.9007755
ra = 28.7092427
decl = 51.4223469
fid = 1
nid = 584
magpsf = 17.2309
sigmapsf = 0.0430021
ssdistnr = -999.0
ssnamenr = null
utc = 2018-08-08 09:37:07

candid = 583492550615015029
jd = 2458337.9925579
ra = 28.7092223
decl = 51.4222895
fid = 2
nid = 583
magpsf = 17.1491
sigmapsf = 0.0463715
ssdistnr = -999.0
ssnamenr = null
utc = 2018-08-07 11:49:17

candid = 582488860615010005
jd = 2458336.9888657
ra = 28.7091963
decl = 51.4223728
fid = 1
nid = 582
magpsf = 17.37
sigmapsf = 0.0350077
ssdistnr = -999.0
ssnamenr = null
utc = 2018-08-06 11:43:57

candid = 581468730615010007
jd = 2458335.9687384
ra = 28.7091927
decl = 51.4224021
fid = 2
nid = 581
magpsf = 16.3816
sigmapsf = 0.0183128
ssdistnr = -999.0
ssnamenr = null
utc = 2018-08-05 11:14:58

candid = 581468730615010008
jd = 2458335.9687384
ra = 28.7092995
decl = 51.4223564
fid = 2
nid = 581
magpsf = 16.3357
sigmapsf = 0.0395491
ssdistnr = -999.0
ssnamenr = null
utc = 2018-08-05 11:14:58

candid = 580475180615015102
jd = 2458334.9751852
ra = 28.7091994
decl = 51.4224
fid = 1
nid = 580
magpsf = 17.0617
sigmapsf = 0.073098
ssdistnr = -999.0
ssnamenr = null
utc = 2018-08-04 11:24:16

candid = 579440470615015024
jd = 2458333.9404745
ra = 28.7092411
decl = 51.4223992
fid = 1
nid = 579
magpsf = 16.8578
sigmapsf = 0.0604518
ssdistnr = -999.0
ssnamenr = null
utc = 2018-08-03 10:34:16

candid = 578425710615015011
jd = 2458332.9257176
ra = 28.7092409
decl = 51.4223206
fid = 2
nid = 578
magpsf = 16.8984
sigmapsf = 0.0626603
ssdistnr = -999.0
ssnamenr = null
utc = 2018-08-02 10:13:02

candid = 576497680615015005
jd = 2458330.9976852
ra = 28.7092083
decl = 51.4223905
fid = 1
nid = 576
magpsf = 16.798
sigmapsf = 0.0518213
ssdistnr = -999.0
ssnamenr = null
utc = 2018-07-31 11:56:40

candid = 576427630615010002
jd = 2458330.9276389
ra = 28.709179
decl = 51.422415
fid = 2
nid = 576
magpsf = 16.4211
sigmapsf = 0.0786289
ssdistnr = -999.0
ssnamenr = null
utc = 2018-07-31 10:15:48

candid = 575475410615015093
jd = 2458329.9754167
ra = 28.7092103
decl = 51.4223835
fid = 1
nid = 575
magpsf = 16.8705
sigmapsf = 0.0512796
ssdistnr = -999.0
ssnamenr = null
utc = 2018-07-30 11:24:36

candid = 571475720615015050
jd = 2458325.9757292
ra = 28.7091913
decl = 51.4222657
fid = 2
nid = 571
magpsf = 17.3392
sigmapsf = 0.0891255
ssdistnr = -999.0
ssnamenr = null
utc = 2018-07-26 11:25:03

candid = 571449740615015004
jd = 2458325.9497454
ra = 28.7091944
decl = 51.4223874
fid = 1
nid = 571
magpsf = 16.9311
sigmapsf = 0.0565813
ssdistnr = -999.0
ssnamenr = null
utc = 2018-07-26 10:47:38

candid = 570448900615015007
jd = 2458324.9489005
ra = 28.7091192
decl = 51.4223263
fid = 1
nid = 570
magpsf = 18.2421
sigmapsf = 0.122677
ssdistnr = -999.0
ssnamenr = null
utc = 2018-07-25 10:46:25

candid = 569451450615010003
jd = 2458323.9514583
ra = 28.7091936
decl = 51.4223725
fid = 1
nid = 569
magpsf = 16.9032
sigmapsf = 0.0489338
ssdistnr = -999.0
ssnamenr = null
utc = 2018-07-24 10:50:05

candid = 568474020615015026
jd = 2458322.9740278
ra = 28.7092028
decl = 51.422382
fid = 1
nid = 568
magpsf = 16.8594
sigmapsf = 0.0502344
ssdistnr = -999.0
ssnamenr = null
utc = 2018-07-23 11:22:36

candid = 567458190615015028
jd = 2458321.9581944
ra = 28.7093059
decl = 51.4223266
fid = 1
nid = 567
magpsf = 16.9553
sigmapsf = 0.0454525
ssdistnr = -999.0
ssnamenr = null
utc = 2018-07-22 10:59:47

candid = 566474350615010004
jd = 2458320.9743519
ra = 28.7092975
decl = 51.4223784
fid = 1
nid = 566
magpsf = 17.4871
sigmapsf = 0.0572639
ssdistnr = -999.0
ssnamenr = null
utc = 2018-07-21 11:23:04

candid = 565426990615010004
jd = 2458319.9269907
ra = 28.7092078
decl = 51.4224304
fid = 1
nid = 565
magpsf = 17.5505
sigmapsf = 0.0600523
ssdistnr = -999.0
ssnamenr = null
utc = 2018-07-20 10:14:51

candid = 564421840615010004
jd = 2458318.9218403
ra = 28.7090819
decl = 51.4224603
fid = 1
nid = 564
magpsf = 18.5266
sigmapsf = 0.10734
ssdistnr = -999.0
ssnamenr = null
utc = 2018-07-19 10:07:27

candid = 562427930615015020
jd = 2458316.9279398
ra = 28.7092204
decl = 51.4223813
fid = 1
nid = 562
magpsf = 17.5245
sigmapsf = 0.0757209
ssdistnr = -999.0
ssnamenr = null
utc = 2018-07-17 10:16:13

Now we will do a couple of plots

In [62]:
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
%matplotlib inline

The light curve in two filters: fid=1 (red, C2) and fid=2 (green, C3). Also included are the non-detections of the object, which are entries that do not have a candidate id (candid). In this case the magnitude (magpsf) should be interpreted as a limiting magnitude, rather than detection magnitude. These points are shown as crosses in pink (C6) and olive (C8).

In [63]:
mjd       = [[],[]]
magpsf    = [[],[]]
sigmapsf  = [[],[]]
nonmjd    = [[],[]]
nonmagpsf = [[],[]]
for candidate in data['candidates']:
    fid = candidate['fid'] - 1
    if 'candid' in candidate:
        mjd[fid].append(candidate['jd'] - 2400000.5)
        magpsf[fid].append(candidate['magpsf'])
        sigmapsf[fid].append(candidate['sigmapsf'])
    else:
        nonmjd[fid].append(candidate['jd'] - 2400000.5)
        nonmagpsf[fid].append(candidate['magpsf'])

plt.figure(figsize=(8,6))
plt.errorbar(mjd[0], magpsf[0], yerr=sigmapsf[0], c="C2", fmt='o')
plt.errorbar(mjd[1], magpsf[1], yerr=sigmapsf[1], c="C3", fmt='o')
plt.errorbar(nonmjd[0], nonmagpsf[0], c="C6", fmt='x')
plt.errorbar(nonmjd[1], nonmagpsf[1], c="C8", fmt='x')
plt.xlabel("MJD")
plt.ylabel("psf mag")
plt.title(objectId)
plt.gca().invert_yaxis()
plt.show()

Now we plot the locations of the individual detections (candidates). Again in red and green for the two filters. The RA scale is stretched to show sctual sky geometry.

In [64]:
import math
from matplotlib.patches import Ellipse
ramean = data['objectData']['ramean']
decmean = data['objectData']['decmean']
ra  = [[],[]]
dec = [[],[]]
for candidate in data['candidates']:
    fid = candidate['fid'] - 1
    if 'candid' in candidate:
        ra[fid].append(3600*(candidate['ra'] - ramean))
        dec[fid].append(3600*(candidate['decl'] - decmean))

rastretch = 1.0/math.cos(math.radians(decmean))
plt.figure(figsize=(6,6))
plt.errorbar(ra[0], dec[0], c="C2", fmt='o')
plt.errorbar(ra[1], dec[1], c="C3", fmt='o')
plt.xlim(-1.5*rastretch, 1.5*rastretch)
plt.ylim(-1.5, 1.5)
plt.xlabel("delta RA, arcsec")
plt.ylabel("delta Dec, arcsec")
plt.title(objectId)
circle = Ellipse((0, 0), 3*rastretch, 3, color='b', fill=False)
plt.gca().add_artist(circle)
plt.show()