Question: Python coding for astronomy (Lengthy, but need help) Somewhat quick explanation on the project. I have so far attempted to match spectra of stars between

Python coding for astronomy (Lengthy, but need help)

Somewhat quick explanation on the project. I have so far attempted to match spectra of stars between two libraries of different quantites.

All the unmatched stars are supposed to be returned listing their coordinates (RA and DEC), where then I would use what is returned to download their png files

and create a webpage of all the unnmatched spectra. Example so far:

(Matching code)

Python coding for astronomy (Lengthy, but need help) Somewhat quick explanation on

Here is a link that serves as a guide for the code I have been using. I changed some notation, such as catalog is DR12Q, and c is sequels. Most of the reference material is on the bottom of the webpage under the "Search around sky" method. Essentially, if it's possible, could I get help with successfully returning only unmatched coordinates? Because numerious attempts have revealed some matched values in DR12Q, but only off by .3 arcseconds. Please any help would be greatly appreciated.

http://docs.astropy.org/en/stable/coordinates/matchsep.html

from ast ropy.coordinates import SkyCoord from astropy import units as u import fitsio import numpy as np from astropy.io import fits hdulist = fits . open ('/d/userstrimble/Desktop/Cats/DR120. fits') ral=hdulist [lj, dataRA" ] decl=hdulist [lj, data [ "DEC' ] DRI 2Q=SkyCoord (ra-ral*u.arc sec, dec-dec1*u.arc sec) obj s=fitsio. read(' /d/userst rimble/Desktop/Cats/sequels. fits' ) w= np.whe re ( ((objs["EBOSS TARGET0"] & 2**16) !=0) | ((objs["EBOSS TARGET0"] & 2**17) != objs-objs[w] ra2-objsRA" ] dec 2-objsDEC' ] sequels = SkyCoord (ra-ra2tu.arc sec, dec-dec2tu.arcsec) idxseq, idxDR, d2d, d3d = DR12Q.search around sky(sequels, 1*u.arc sec) #sets array at 0 index matched np.ze ros (ien ( sequels)) #every match is a 1 matched[idxseq]-1 #unmatched are 0? a = np.where (matched--0) #To remove any duplicated coordinates removeDuplicates-h for a in ra2: 1T str(razlaj) not in removeDuplicates.keys(): removeDuplicates [ st r ( ra2 [ a] ) ] =[ st r ( dec 2 [ a] ) ] print ("python sdssDR13spect roquery.py" +str(ra2[a])+ ""+ str(dec2 [a]))"| csh" elif str(dec2[a]) not in removeDuplicates[str(ra2[a])] removeDuplicatesIstr (ra2[a])].append (str(dec2[a])) print ("python sdssDR13spect roquery.py" +str(ra2[a])+ ""+ str(dec2 [a]))"| csh" from ast ropy.coordinates import SkyCoord from astropy import units as u import fitsio import numpy as np from astropy.io import fits hdulist = fits . open ('/d/userstrimble/Desktop/Cats/DR120. fits') ral=hdulist [lj, dataRA" ] decl=hdulist [lj, data [ "DEC' ] DRI 2Q=SkyCoord (ra-ral*u.arc sec, dec-dec1*u.arc sec) obj s=fitsio. read(' /d/userst rimble/Desktop/Cats/sequels. fits' ) w= np.whe re ( ((objs["EBOSS TARGET0"] & 2**16) !=0) | ((objs["EBOSS TARGET0"] & 2**17) != objs-objs[w] ra2-objsRA" ] dec 2-objsDEC' ] sequels = SkyCoord (ra-ra2tu.arc sec, dec-dec2tu.arcsec) idxseq, idxDR, d2d, d3d = DR12Q.search around sky(sequels, 1*u.arc sec) #sets array at 0 index matched np.ze ros (ien ( sequels)) #every match is a 1 matched[idxseq]-1 #unmatched are 0? a = np.where (matched--0) #To remove any duplicated coordinates removeDuplicates-h for a in ra2: 1T str(razlaj) not in removeDuplicates.keys(): removeDuplicates [ st r ( ra2 [ a] ) ] =[ st r ( dec 2 [ a] ) ] print ("python sdssDR13spect roquery.py" +str(ra2[a])+ ""+ str(dec2 [a]))"| csh" elif str(dec2[a]) not in removeDuplicates[str(ra2[a])] removeDuplicatesIstr (ra2[a])].append (str(dec2[a])) print ("python sdssDR13spect roquery.py" +str(ra2[a])+ ""+ str(dec2 [a]))"| csh

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!