# AWK script to Convert # a LID into a Simbad name # (tentative!) # Just execute: gawk -f simid.awk ubvmeans.dat BEGIN { cl["0"] = "Berkeley"; cl["1"] = "Collinder"; cl["2"] = "Melotte"; cl["3"] = "Ruprecht"; cl["4"] = "VDBH"; cl["01"] = "Abell"; cl["02"] = "Alter"; cl["03"] = "Apriamaswili"; cl["04"] = "Arp"; cl["05"] = "Baade"; cl["06"] = "Barhatova"; cl["07"] = "Basel"; cl["08"] = "Biurakan"; cl["09"] = "Blanco"; cl["10"] = "Czernik"; cl["11"] = "Deje"; cl["12"] = "Dolidze"; cl["13"] = "Dolidze-Dzim"; cl["14"] = "Dufay"; cl["15"] = "Feinstein"; cl["16"] = "Gingerich"; cl["17"] = "Graff"; cl["18"] = "Haffner"; cl["19"] = "Harvard"; cl["20"] = "Haute-Provence"; cl["21"] = "Hogg"; cl["22"] = "Iskurzdajan"; cl["23"] = "King"; cl["24"] = "Lynga"; cl["25"] = "Markarjan"; cl["26"] = "Palomar"; cl["27"] = "Pismis"; cl["28"] = "Roslund"; cl["29"] = "Sher"; cl["30"] = "Stephenson"; cl["31"] = "Stock"; cl["32"] = "Sahlbajan"; cl["33"] = "Terzan"; cl["34"] = "Tombaugh"; cl["35"] = "Trumpler"; cl["36"] = "Upgren"; cl["37"] = "VDB"; cl["38"] = "Westerlund"; cl["39"] = "Zwicky"; cl["40"] = "Bochum"; cl["41"] = "Waterloo"; # Constellations cst[1]="And"; cst[2]="Ant"; cst[3]="Aps"; cst[4]="Aqr"; cst[5]="Aql"; cst[6]="Ara"; cst[7]="Ari"; cst[8]="Aur"; cst[9]="Boo"; cst[10]="Cae"; cst[11]="Cam"; cst[12]="Cnc"; cst[13]="CVn"; cst[14]="CMa"; cst[15]="CMi"; cst[16]="Cap"; cst[17]="Car"; cst[18]="Cas"; cst[19]="Cen"; cst[20]="Cep"; cst[21]="Cet"; cst[22]="Cha"; cst[23]="Cir"; cst[24]="Col"; cst[25]="Com"; cst[26]="CrA"; cst[27]="CrB"; cst[28]="Crv"; cst[29]="Crt"; cst[30]="Cru"; cst[31]="Cyg"; cst[32]="Del"; cst[33]="Dor"; cst[34]="Dra"; cst[35]="Equ"; cst[36]="Eri"; cst[37]="For"; cst[38]="Gem"; cst[39]="Gru"; cst[40]="Her"; cst[41]="Hor"; cst[42]="Hya"; cst[43]="Hyi"; cst[44]="Ind"; cst[45]="Lac"; cst[46]="Leo"; cst[47]="LMi"; cst[48]="Lep"; cst[49]="Lib"; cst[50]="Lup"; cst[51]="Lyn"; cst[52]="Lyr"; cst[53]="Men"; cst[54]="Mic"; cst[55]="Mon"; cst[56]="Mus"; cst[57]="Nor"; cst[58]="Oct"; cst[59]="Oph"; cst[60]="Ori"; cst[61]="Pav"; cst[62]="Peg"; cst[63]="Per"; cst[64]="Phe"; cst[65]="Pic"; cst[66]="Psc"; cst[67]="PsA"; cst[68]="Pup"; cst[69]="Pyx"; cst[70]="Ret"; cst[71]="Sge"; cst[72]="Sgr"; cst[73]="Sco"; cst[74]="Scl"; cst[75]="Sct"; cst[76]="Ser"; cst[77]="Ser"; cst[78]="Sex"; cst[79]="Tau"; cst[80]="Tel"; cst[81]="Tri"; cst[82]="TrA"; cst[83]="Tuc"; cst[84]="UMa"; cst[85]="UMi"; cst[86]="Vel"; cst[87]="Vir"; cst[88]="Vol"; cst[89]="Vul"; } # Letter used in some codes function letter(n) { if (n == 0) return(""); return(substr("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",n,1)); } # Find the multipicity function mult() { return(letter(substr($0,11,1)+0)); } function mult2() { # Multiplicity if larger than 1 l_ = substr($0,11,1)+0; if (l_>1) return(letter(l_)); return("") } # Negative: BD CD CPD /^-40/ { print "CPD-" substr($0, 4,2), substr($0,6,5) mult2(); next } /^-20/ { print "CD-" substr($0, 4,2), substr($0,6,5) mult2(); next } /^-00/ { z=substr($0, 4,2)+0; if(z>=52) c = "CPD"; else if (z >= 23) c = "CD"; else c = "BD"; print c "-" substr($0, 4,2), substr($0,6,5) mult2(); next } # Large catalogues /^[0+]00/ { print "BD+" substr($0, 4,2), substr($0,6,5) mult2(); next } /^[0+]100/ { print "HD", substr($0,5,6) mult2(); next } /^[0+]150/ { print "SAO", substr($0,5,6); next } /^[0+]2/ { print "NGC", substr($0,3,4), substr($0,7,4); next } /^[0+]3/ { print "IC" , substr($0,3,4), substr($0,7,4); next } /^[0+]4/ { print "Cl" , cl[substr($0,3,2)], substr($0,5,2), substr($0,7,4); next } /^[0+]5/ { print "Cl" , cl[substr($0,3,1)], substr($0,4,3), substr($0,7,4); next } # Small lists (not complete!) /^[0+]6000/ { print "LB", substr($0,6,5); next } /^[0+]6001/ { print "LTT", substr($0,6,5) mult2(); next } /^[0+]6002/ { print "BPM", substr($0,6,5); next } /^[0+]6003/ { print "** LDS", substr($0,6,5) mult(); next } /^[0+]6004/ { print "SV* HV", substr($0,6,5); next } /^[0+]6006/ { print "Weistrop", substr($0,6,5); next } /^[0+]6007/ { print "ADS", substr($0,6,5) mult(); next } /^[0+]6009/ { print "DO", substr($0,6,5); next } /^[0+]61000/ { print "LSS", substr($0,7,4); next } /^[0+]61002/ { print "GJ", substr($0,7,4) mult2(); next } #/^[0+]61003/ { print "PLX", substr($0,7,4); next } /^[0+]61005/ { print "GR* ", substr($0,7,4); next } /^[0+]61006/ { print "GD", substr($0,7,4); next } /^[0+]6100[78]/ { print "Ton", substr($0,7,4); next } /^[0+]61009/ { print "Hilt", substr($0,7,4); next } /^[0+]61010/ { print "PV", substr($0,7,4); next } /^[0+]61012/ { print "MWC", substr($0,7,4); next } /^[0+]61013/ { print "Hen 3-", substr($0,7,4); next } /^[0+]61016/ { print "PHL", substr($0,7,4); next } /^[0+]61017/ { print "Hbg", substr($0,7,4); next } /^[0+]61018/ { print "C*", substr($0,7,4); next } /^[0+]61025/ { print "LHS", substr($0,7,4); next } /^[0+]61027/ { print "Wray 15-", substr($0,7,4); next } /^[0+]61014/ { print "Wolf", substr($0,7,4); next } /^[0+]61022/ { print "Ross", substr($0,7,4); next } /^[0+]620001/ { print "Feige", substr($0,8,3); next } /^[0+]620002/ { print "[L64]", substr($0,8,3); next } /^[0+]620003/ { print "RL", substr($0,8,3); next } /^[0+]620004/ { print "HZ", substr($0,8,3); next } /^[0+]620005/ { print "[L68]", substr($0,8,3); next } #/^[0+]620007/ { print "[W76b]", substr($0,8,3); next } [W76b] BBI , [W76b] BBII /^[0+]620010/ { print "EM* AS", substr($0,8,3); next } /^[0+]620020/ { print "EGGR", substr($0,8,3); next } /^[0+]620030/ { print "MCC", substr($0,8,3); next } /^[0+]620050/ { print "PV", substr($0,8,3); next } /^[0+]620052/ { print "BI", substr($0,8,3); next } /^[0+]620053/ { print "AzV", substr($0,8,3); next } /^[0+]620055/ { print "Em* VES", substr($0,8,3); next } /^[0+]620056/ { print "PN A66", substr($0,8,3); next } # Variable stars /^[0+]65..0/ { c=substr($0,4,2)+0; l1=substr($0,7,2)+0; l2=substr($0,9,2)+0; print "V*", letter(l1) letter(l2), cst[c]; next } /^[0+]65..1/ { c=substr($0,4,2)+0; l1=substr($0,7,2)+0; l2=substr($0,9,2)+0; print "V* V" substr($0,7,4), cst[c]; next } /^[0+]66/ { print "Loden", substr($0,4,4) "-" substr($0,8,3); next } /^[0+]70/ { print "SA", substr($0,4,3) "-" substr($0,7,4); next } /^[0+]71/ { print "SpA", substr($0,4,3) "-" substr($0,7,4); next } /^[0+]73/ { print "BSD", substr($0,4,3) "-" substr($0,7,4); next } /^[0+]801/ { print "LS I +" substr($0,5,2) " " substr($0,7,4); next } /^[0+]802/ { print "LS II +" substr($0,5,2) " " substr($0,7,4); next } /^[0+]803/ { print "LS III +" substr($0,5,2) " " substr($0,7,4); next } /^[0+]804/ { print "LS IV +" substr($0,5,2) " " substr($0,7,4); next } /^[0+]805/ { print "LS V +" substr($0,5,2) " " substr($0,7,4); next } /^[0+]806/ { print "LS VI +" substr($0,5,2) " " substr($0,7,4); next } /^[0+]858..0/ { print "Sk -" substr($0,5,2) "-" substr($0,8,3); next } /^[0+]980/ { print "G", substr($0,5,3) "-" substr($0,8,3); next } /^[0+]982/ { print "G", substr($0,5,3) "-B" substr($0,8,3); next } /^[0+]985/ { print "LP", substr($0,5,3) "-" substr($0,8,3); next } /^[0+]986/ { print "L" , substr($0,5,3) "-" substr($0,8,3) mult2(); next } /^[0+]988/ { print "[SGR85]", substr($0,5,4) "-" substr($0,9,2); next } /^[0+]99/ { print "LP", substr($0,4,4) "-" substr($0,8,3) mult2(); next } # Default: Simbad used GEN# { s = substr($0,1,1); if(s == "0") s="+"; print "GEN#", s substr($0,2,1) "." substr($0,3,8); }