Skip to content

astar/thesisReloaded

Repository files navigation

-*- mode: org; -*-

log

<2013-02-23 Sat>

python web_galery.py trainning3/3 python ../makeHtmlTable/makeHtmlTable.py “3/*_preview.png” sed “s/\_detail.png/\_detail.svg/g” 3.html > 3_svg.html

<2012-09-27 Thu>

scp test_cluster form main –> normalize

problems

na maie neni pyfits (fitsio)

na taurus nechdi novy fitsits

data/test_ contains normalized files

<2012-08-01 Wed>

https://stelweb.asu.cas.cz/wiki/index.php/Correct_names.sql

<2012-07-29 Sun>

gsc catalog http://archive.stsci.edu/gsc/

regex search in list [i for i, item in enumerate(ra) if re.search(‘pyfits’, item)]

list of catalogs http://stupendous.rit.edu/tass/catalogs/catalogs.html

good catalog? http://www.aavso.org/apass/

convert ra, to degrees http://www.atnf.csiro.au/people/Enno.Middelberg/python/python.html

scripts bin/dec2deg.py bin/ra2deg.py created library lib/convert.py

<2012-07-25 Wed>

examples of normalized spectras http://physics.muni.cz/~vazny/thesisReloaded/sample_of_normalized_spectra/

<2012-07-24 Tue> script renormalized

<2012-06-01 Fri>

Ondrejov

Stazeni celeho ond archivu analyza

<2012-05-22 Tue>

pollux.asu.cas.cz doesnot work!

tapsh seems the way to go!

http://vo.ari.uni-heidelberg.de/soft/tapsh http://docs.g-vo.org/tapsh-manual.html

pyfits has to be install via aptitude not pip

simbad TAP

http://simbad.u-strasbg.fr/simbad/sim-tap

Bezier

http://processingjs.nihongoresources.com/bezierinfo/ http://stackoverflow.com/questions/12643079/bezier-curve-fitting-with-scipy

Make trainning3 visible on wiki and inform Pavla and Petr

Finish program ema (EmissionManualAnalyzer)

Use ema to classify ond fits

categories

emission

emisson sometimes

pcygni

pcygni sometimes

pcygni never

emission never

Download rest of the programs of sdss [31/31]

survey programname Column1

  • [X] sdss apbias 1920
  • [X] sdss commissioning 1920
  • [X] sdss disk 10240
  • [X] sdss fstars 5120
  • [X] sdss hyades 640
  • [X] sdss legacy 1232640
  • [X] sdss lowz 5760
  • [X] sdss lowz_loveday 640
  • [X] sdss lowz_lrg 28160
  • [X] sdss m31_fstars 1920
  • [X] sdss msturnoff 5120
  • [X] sdss orion 5120
  • [X] sdss perseus 1280
  • [X] sdss photoz 12160
  • [X] sdss preboss 6400
  • [X] sdss premarvels_preselection 12800
  • [X] sdss reddening 5760
  • [X] sdss southern 85760
  • [X] sdss taurus 1920
  • [X] segue1 segcluster 9600
  • [X] segue1 segclusterf 5120
  • [X] segue1 seglowlat 8960
  • [X] segue1 seglowlatf 7040
  • [X] segue1 segpointed 10240
  • [X] segue1 segpointedf 10240
  • [X] segue1 segtest 7040
  • [X] segue1 segtestf 2560
  • [X] segue1 segue 115200
  • [X] segue1 seguefaint 106880
  • [X] segue2 segcluster 1280
  • [X] segue2 segue2 133760

SQL for links of sdss programs

SELECT ‘wget ‘+ ‘”’+ dbo.fGetUrlFitsSpectrum(s.specObjID)+ ‘”’ + ’ -O ’ + p.programname + ‘' + CAST(s.specObjID as varchar(max)) + ‘.fits’ INTO mydb.sdss_all_without_legacy_southern FROM SpecPhotoAll s, platex p WHERE s.specObjID is not null AND s.plateid = p.plateid AND p.programname not in ( ‘legacy’, ‘southern’) and p.survey =’sdss’ order by p.programname, s.specObjID

dirs for sdss programs

cut -f2 sdss | xargs mkdir

Find color indexes

Use Object Oriented Database for parametres storage ?

Analyzator fits –> web

Color indexes

SQL group by # specter (science primary ..etc)

Color transformation

http://arxiv.org/pdf/0711.4356v1.pdf

List of programs in surveys

SELECT p.programname FROM SpecPhotoAll s, platex p WHERE s.specObjID is not null AND s.plateid = p.plateid AND p.survey = ‘segue1’ group by p.survey,p.programname order by p.survey, p.programname

not in database 3533121815952072704

ab_normal script

check and move unnormalized fits on taurus created trainnin3

all spectra sorted

vazny@taurus.physics.muni.cz:public_html/thesisReloaded/trainning2/

Solved? problem with crashing ema_local

Downloaded all spectra from Ondrejov

Check download directory vs name in th fits

def obj(name): hdu = pyfits.open(name) f.write(hdu[0].header[‘OBJECT’]+ ‘,’+ name.split(‘/’)[1] + ‘\n’)

Classification of Ondrejov spectra

divided into 7 categories

web pages of classified trainnig sample of ond spectra

for i in ?; do mkdir $i/thm;done http://physics.muni.cz/~vazny/wiki/index.php/OndTrainningSample

ema

ready for real test!!!

download votable.xml for stars from server

download spectra into download/star/*.fits

moving inot categories

run corrupt.py on segue1, segue2, sdss

modified corrupt.py to check subdirectories

dirlist program for checking download statu

downloaded fits from sdss survey

Processed corrupted spectra segue1 [10/10]

  • [X] segcluster
  • [X] segclusterf
  • [X] seglowlat
  • [X] seglowlatf
  • [X] segpointed
  • [X] segpointedf
  • [X] segtest
  • [X] segtestf
  • [X] segue
  • [X] seguefaint

Processed spectra segue2 [2/2]

  • [X] segcluster
  • [X] segue2

Results in log/

Download segue1 [10/10]

  • [X] segcluster
  • [X] segclusterf
  • [X] seglowlat
  • [X] seglowlatf
  • [X] segpointed
  • [X] segpointedf
  • [X] segtest
  • [X] segtestf
  • [X] segue
  • [X] seguefaint

Download segue2 [2/2]

  • [X] segcluster
  • [X] segue2

SDSS Caveats

http://www.sdss.org/dr7/products/spectra/index.html#caveats

Getting Started with SEGUE

http://www.sdss3.org/surveys/segue2.php#GettingStarted

Avoiding Duplicates

as described here http://www.sdss3.org/dr8/algorithms/segueii/segue_sqlcookbook.php#Tables object with sciencePrimary = 1 should by unique. The list of non/unique objects could be obtained via

SELECT p.programname,sciencePrimary, count(*) FROM SpecPhotoAll s, platex p WHERE s.specObjID is not null AND s.plateid = p.plateid and p.survey like ‘segue%’ group by p.programname,sciencePrimary order by p.programname,sciencePrimary

Tables decriptions of DR8 SEGUE

http://www.sdss3.org/dr8/algorithms/segueii/segue_sqlcookbook.php#Tables

transform log ot copy script to get corrupted fits

sed -E ‘s:^../segue/([^ ]*)(.*):cp ../segue/\1 ../corrupt_segue/\1:’ ../log/corrupt_segue.log > copy_corrupt_segue.sh

corrupt.py also write naxis2 and difference between # of corrupted pixels and naxis2

get ubv for Be stars from simbad

tap and adq in simbad

simbad tables

query

SELECT basic.OID, RA, DEC, main_id AS “Main identifier”, coo_bibcode AS “Coord Reference”, nbref AS “NbReferences”, f1.flux as B, f2.flux as V, f3.flux as U, f4.flux as J, f5.flux as H, f6.flux as K FROM basic JOIN ident i ON i.oidref = oid JOIN flux f1 ON f1.oidref = oid JOIN flux f2 ON f2.oidref = oid JOIN flux f3 on f3.oidref = oid JOIN flux f4 ON f4.oidref = oid JOIN flux f5 on f5.oidref = oid JOIN flux f6 on f6.oidref = oid WHERE f1.filter = ‘B’ AND f2.filter = ‘V’ AND f3.filter =’U’ AND f4.filter =’J’ AND f5.filter = ‘H’ AND f6.filter = ‘K’ AND id in ( ‘HD 224699’, ‘V* V639 Cas’, ‘HD 225095’, ‘* 10 Cas’, ‘V* SX Cas’, ‘V* V742 Cas’, ‘TYC 4026-362-1’, ‘* kap Cas’, ‘HD 232214’, ‘BD+63 82’, ‘* omi Cas’, ‘BD+65 91’, ‘HD 4931’, ‘* gam Cas’, ‘HD 6226’, ‘HD 6343’, ‘* phi And’, ‘V* V764 Cas’, ‘HD 7720’, ‘HD 236737’, ‘HD 9709’, ‘HD 9612’, ‘V* V771 Cas’, ‘V* phi Per’, ‘HD 10664’, ‘V* V978 Cas’, ‘HD 232525’, ’ * eps Cas’, ‘V* V777 Cas’, ‘V* V472 Per’, ‘BD+82 50’, ‘V* V787 Cas’, ‘HD 13867’, ‘V* V551 Per’, ‘V* V520 Per’, ‘V* V554 Per’, ‘V* V788 Cas’, ‘HD 18552’, ‘V* RX Cas’, ‘V* V801 Cas’, ‘HD 20134’, ‘V* BK Cam’, ‘HD 20899’, ‘TYC 3320-1861-1’, ‘HD 21455’, ‘HD 21650’, ‘HD 21641’, ‘* psi Per’, ‘V* CT Cam’, ‘HD 22780’, ‘* 13 Tau’, ‘17 Tau ‘, ‘* 23 Tau’, ‘eta Tau’, ‘HD 23552’, ‘BU Tau ‘, ‘HD 23800’, ‘V* X Per’, ‘HD 24479’, ‘NAME Menkhib’, ‘* c Per’, ‘HD 26398’, ‘V* CI Cam’, ‘* 228 Eri’, ‘* 56 Eri’, ‘HD 29866’, ‘* alf Cam’, ‘V* AB Aur’, ‘HD 284012’, ‘V* eps Aur’, ‘* 11 Cam’, ‘* 105 Tau’, ‘V* lam Eri’, ‘V* V416 Aur’, ‘NAME RIGEL’, ‘* 12 Aur’, ‘V* V1369 Ori’, ‘* HD 34921’, ‘V* eta Ori’, ‘* 25 Ori’, ‘V* V1372 Ori’, ‘V* V1374 Ori’, ‘HR 1847A’, ‘* 120 Tau’, ‘HD 36861’, ‘HD 37115’, ‘NAME ALNILAM A’, ‘* zet Tau’, ‘HD 37330’, ‘* ome Ori’, ‘HD 37971’, ‘V* V434 Aur’, ‘V* V731 Tau’, ‘V* V1165 Tau’, ‘HD 246878’, ‘HD 39478’, ‘* 62 Ori’, ‘V* V696 Mon’, ‘V* V447 Aur’, ‘* 17 Lep’, ‘HD 42406’, ‘HD 43285’, ‘HD 43544’, ‘V* V1308 Ori’, ‘V* FR CMa’, ‘HD 44996’, ‘V* PZ Gem’, ‘V* FS CMa’, ‘bet Mon A’, ‘bet Mon C’, ‘* 18 Gem’, ‘V* AX Mon’, ‘HD 45995’, ‘V* QQ Gem’, ‘HD 47054’, ‘V* S Mon’, ‘V* KS CMa’, ‘V* V743 Mon’, ‘V* V742 Mon’, ‘HD 50820’, ‘AU Mon ‘, ‘V* V744 Mon’, ‘HD 50658’, ‘V* QY Gem’, ‘V* OY Gem’, ‘V* FU CMa’, ‘V* GU CMa’, ‘V* V637 Mon’, ‘V* V749 Mon’, ‘HD 53416’, ‘V* FV CMa’, ‘HD 55271’, ‘V* EW CMa’, ‘V* ome CMa’, ‘HD 56039’, ‘V* OT Gem’, ‘V* FW CMa’, ‘V* FY CMa’, ‘* bet CMi’, ‘V* V378 Pup’, ‘V* BN Gem’, ‘HD 61224’, ‘BR CMi ‘, ‘HD 62367’, ‘V* FF Cam’, ‘* omi Pup’, ‘HD 64109’, ‘V* BT CMi’, ‘V* UX Mon’, ‘V* V695 Mon’, ‘V* V420 Pup’, ‘HD 71072’, ‘HD 81357’, ‘HD 83953’, ‘HD 86612’, ‘* 17 Sex’, ‘HD 89884’, ‘HD 91120’, ‘gam UMa’, ‘* zet Crv’, ‘* kap Dra’, ‘V* tet CrB’, ‘V* V1040 Sco’, ‘V* V839 Her’, ‘* 48 Lib’, ‘V* AG Dra’, ‘BD+79 499’, ‘V* chi Oph’, ‘* zet Oph’, ‘V* XX Oph’, ‘V* V2385 Oph’, ‘BD+23 3183’, ‘HD 162428’, ‘V* V744 Her’, ‘V* RS Oph’, ‘* 66 Oph’, ‘V* V974 Her’, ‘V* V4379 Sgr’, ‘V* YY Her’, ‘V* MY Ser’, ‘HD 168135’, ‘HD 168957’, ‘V* NW Ser’, ‘HD 169033’, ‘BD+16 3492’, ‘V* V4031 Sgr’, ‘V* V431 Sct’, ‘HD 171219’, ‘V* V532 Lyr’, ‘HD 171780’, ‘HD 173292’, ‘HD 173219’, ‘HD 173371’, ‘V* CX Dra’, ‘HD 174105’, ‘V* bet Lyr’, ‘HD 175511’, ‘HD 174886’, ‘HD 175863’, ‘* 64 Ser’, ‘HD 177648’, ‘V* V4409 Sgr’, ‘* iot Lyr’, ‘V* V4024 Sgr’, ‘HD 178515’, ‘HD 179218’, ‘HD 179343’, ‘V* V1448 Aql’, ‘HD 180398’, ‘V* U Sge’, ‘V* ups Sgr’, ‘V* CH Cyg’, ‘V* V558 Lyr’, ‘HD 183261’, ‘V* V923 Aql’, ‘bet Cyg B’, ‘V* V1294 Aql’, ‘* 11 Cyg’, ‘V* V341 Sge’, ‘V* V1463 Aql’, ‘BD+05 4285’, ‘V* V1507 Cyg’, ‘HD 187350’, ‘V* CI Cyg’, ‘V* V1339 Aql’, ‘* 12 Vul’, ‘V* V396 Vul’, ‘V* V2028 Cyg’, ‘* 25 Cyg’, ‘HD 189689’, ‘HD 190150’, ‘V* V1362 Cyg’, ‘V* V1768 Cyg’, ‘HD 190944’, ‘V* V448 Cyg’, ‘* 28 Cyg’, ‘V* BE Cap’, ‘* 20 Vul’, ‘HD 192445’, ‘V* QR Vul’, ‘V* V2113 Cyg’, ‘V* LZ Del’, ‘HD 193182’, ‘P Cyg ‘, ‘* 25 Vul’, ‘V* V1972 Cyg’, ‘V* V2118 Cyg’, ‘V* V2119 Cyg’, ‘V* V2120 Cyg’, ‘HD 195554’, ‘HD 195407’, ‘HD 195358’, ‘* 1 Del’, ‘BD+47 3129’, ‘V* V2123 Cyg’, ‘BD+36 4145’, ‘HD 196712’, ‘BD+48 3184’, ‘HD 197434’, ‘V* alf Cyg’, ‘V* V568 Cyg’, ‘* lam Cyg’, ‘V* V2135 Cyg’, ‘* 55 Cyg’, ‘BD+46 3062’, ‘V* V2136 Cyg’, ‘V* V417 Cep’, ‘V* V418 Cep’, ‘HD 199218’, ‘V* V2139 Cyg’, ‘HD 199579’, ‘V* V1057 Cyg’, ‘V* V832 Cyg’, ‘V* V2144 Cyg’, ‘V* V1331 Cyg’, ‘V* V1931 Cyg’, ‘V* V380 Cep’, ‘BD+45 3377’, ‘HD 200830’, ‘HD 201522’, ‘V* V2148 Cyg’, ‘HD 239601’, ‘V* V420 Cep’, ‘V* V421 Cep’, ‘* ups Cyg’, ‘68 Cyg’, ‘HD 203374’, ‘V* V382 Cep’, ‘HD 203356’, ‘V* V2153 Cyg’, ‘V* NT Peg’, ‘HD 204185’, ‘V* V2155 Cyg’, ‘V* V2162 Cyg’, ‘V* V2163 Cyg’, ‘HD 205060’, ‘HD 205551’, ‘V* V2166 Cyg’, ‘V* V433 Cep’, ‘* eps Cap’, ‘HD 206267’, ‘BD+57 2358’, ‘HD 206773’, ‘BD+57 2376’, ‘HD 207232’, ‘HD 207329’, ‘HD 207370’, ‘V* AG Peg’, ‘16 Peg ‘, ‘V* EM Cep’, ‘HD 208682’, ‘BD+48 3561’, ‘V* V2174 Cyg’, ‘V* V439 Cep’, ‘* omi Aqr’, ‘HD 209552’, ‘* 25 Peg’, ‘BD+60 2349’, ‘V* EE Cep’, ‘* lam Cep’, ‘V* V357 Lac’, ‘* 31 Peg’, ‘* pi Aqr’, ‘HD 214167’, ‘* eps PsA’, ‘HD 216057’, ‘14 Lac ‘, ‘V* V423 Lac’, ‘V* EW Lac’, ‘HD 217543’, ‘V* omi And’, ‘* bet Psc’, ‘V* KX And’, ‘V* KY And’, ‘V* V813 Cas’, ‘HD 220582’, ‘V* Z And’, ‘HD 221692’, ‘V* V817 Cas’, ‘* 6 Cas’, ‘V* V818 Cas’, ‘BD+66 1651’, ‘* rho Cas’, ‘BD+71 1238’, ‘BD+65 1970’, ‘HIP 118163’, ‘V* LQ And’, ‘HD 224544’)

download list of be stars

wget https://stelweb.asu.cas.cz/stars/dbbe/upravy/vyber1.phtml –http-user=ondrejov –http-password=tajneheslo –no-check-certificate

get only names from the file

awk ‘{print $3,$4, $5}’ vyber1.phtml > be sed -i ‘s/[0-9]\{1,2\}..*//’ be

stupid! unable to do in one step

get ugrzi from casjobs for corrupted spectra

create list of ID’s

awk ‘{print $1}’ log/corrupt_segue2.log > log/corrupt_segue2_specObjID.log sed -rni ‘s/[^[:digit:]]*(:digit:+).fits/\1/p’ log/corrupt_segue2_specObjID.log

2117866432871032832 2117920858696607744 2122348591501568000 . . 2131403344785205248

upload to mydb

first insert column name

sed -i ‘1i\specObjID’ log/corrupt_segue2_specObjID.log

process only stras with not full corrupted spectra

awk ‘{if ($2<3000){print $2}}’ corrupt_segue2.log

create list of corruption < whole spectrum

awk ‘{if ($2<3000){print “cp ” $1 ” corrupt_segue2_small”}}’ corrupt_segue2.log >copy_corrupt_segue2_small.sh awk ‘{if ($2<3000){print “cp ” $1 ” corrupt_seguefaint_small”}}’ corrupt_seguefaint.log >copy_corrupt_seguefaint_small.sh awk ‘{if ($2<3000){print “cp ” $1 ” corrupt_segue_small”}}’ corrupt_segue.log.log >copy_corrupt_segue_small.sh

corrupted all

awk ‘{if ($2>3000){print $2}}’ corrupt_segue2.log | wc

segue2seguefaintsegue
908580431

not corrutpted all

awk ‘{if ($2<3000){print $2}}’ corrupt_seguefaint.log | wc

segue2seguefaintsegue
398303222

Store number of zeros in fits file

corrupt.py too slow

if not sigma.any():

z = len(sigma)

Number of spectras in individual programs

stars only

SELECT p.programname, count(s.specObjID) INTO mydb.stars FROM SpecPhotoAll s, platex p WHERE s.specObjID is not null AND s.plateid = p.plateid AND s.class = ‘STAR’ group by p.programname

programnameColumn1
reddening4262
segpointedf9046
m31_fstars1749
segcluster9955
seglowlat8047
fstars4556
lowz_lrg3020
perseus743
segtestf2239
commissioning1766
lowz623
lowz_loveday52
orion4568
photoz830
segclusterf4525
apbias397
msturnoff4850
southern39838
taurus1763
hyades274
preboss1322
seguefaint93598
disk9903
premarvels_preselection5360
seglowlatf6185
segpointed9546
segtest6373
segue108712
segue2125357
legacy187342

all spectra

SELECT p.programname, count(s.specObjID) INTO mydb.all1 FROM SpecPhotoAll s, platex p WHERE s.specObjID is not null AND s.plateid = p.plateid group by p.programname

programnameColumn1
reddening5760
segpointedf10240
m31_fstars1920
segcluster10880
seglowlat8960
commissioning1920
lowz5760
lowz_loveday640
orion5120
photoz12160
segclusterf5120
fstars5120
lowz_lrg28160
perseus1280
segtestf2560
apbias1920
msturnoff5120
southern85760
taurus1920
hyades640
preboss6400
seguefaint106880
disk10240
premarvels_preselection12800
seglowlatf7040
segpointed10240
segtest7040
segue115200
segue2133760
legacy1232640

Problems

SOLVED

pf.py gets only 1846 from 1984 corrupted spectra (killed! after that)

Solutions

python differenxe two list

c3 = set(c1).difference(set(c2))

Releases

No releases published

Packages

No packages published