i would like to read some RA and Dec values from a file to find only the unique ones. This will then be printed to a new file with only unique information associated with each RA and Dec.
The file contains starId, RA, Dec, Mag, Temp, ....
0001, 19:20:21.22, 37:40:43.5, 14.6, 5432, ...
readcol,'/filepath/filename.txt',starId,RA,DEC,Mag, Temp, format='L,A,A,D,D',/silent
idx = uniq(starId)
when i try to write the unique list to a file
openw,2,'/filepath/uniqlist.txt'
printf,2,[transpose([starId[idx]), transpose(RA[idx]), transpose(Dec[idx])]
close,2
I only get the first value of the RA and Dec
Can anyone help, what format specifiers can i use to read or write the correct information to the file