ORB6 Programs for adding/grading orbits: My usual procedure for adding a new set of orbits to the master file orb6.master is to first create the input file orbits.1 (new orbital elements, in the same format used for orb6.master), then run the command file neworbs.com. That file calls the following programs in order (and yes, some or all of these routines could have been combined into one. Feel free to do so if you wish!): wdspluck4: extracts data from the WDS for grading orbit and plotting input files: orbits.1, ../WDS/wds???.data output file: orbits.2 orbtrans7: "translates" the WDS-format file into the format used in the grading and plotting routines. Weights are initially set to 1.0 - they'll be determined in the next routine. input file: orbits.2 output file: orbits.3 obsweighter5: determines weights for individual measures, using the scheme developed in 2017 involving separation, telescope aperture, method, and observer input file: orbits.3 output file: orbits.4 quadflip4: determines O-C residuals and flips theta values as needed to minimize the residuals in theta. The list of flipped measures are written to a separate file so they can be changed in the WDS if desired. input file: orbits.4 output file: orbits.5, quads.flipped grader5: determines residuals and uses them, as well as orbit coverage and other factors, to determine an orbit grade (on a scale of 1 to 5). The final output file orbits.6 is very similar to orbits.1, except for the addition of grades and name for the orbit figures. BTW, the routine will print an error message to the screen if there's a mismatch in name between orbits.1 and orbits.5 (this is usually a simple confusion with components, such as "Aa,B" versus "AB"). input files: orbits.1, orbits.5 output file: orbits.6 plotorb: IDL routine for generating figures. The default extension ("...a.png", "...b.png", etc) can be changed by changing the starting value for "iexten" in the "PLOTIT" portion of the program. Note: you may have to modify the pngfile names in orbits.6 to match those generated by this program. input file: orbits.5 output files: wds???????????.png *** Note that the current version of plotorb will crash at the end of creating plots. This does not matter currently, as all requested plots are made. The program just looks for the next orbit in the file, doesn't find it, and crashes. I have not fixed this problem. ----- Final steps: (1) Look at the pngfiles to see that everything looks correct. Usually they're fine, but occasionally the published omega and Omega values are flipped or one of them is off by 180deg. This may involve some experimenting (flip an angle, replot, repeat as necessary)... (2) When satisifed, move them to the PNG directory using a "mv -i" command to make sure none of the pngfile names are already in use. If one or more is, you may have to rename those pngfiles (and change the names in orbits.6) before moving the remainder of them. (3) Fold the lines from orbits.6 into orb6.master. This is done by hand, so the yes/no flags can be changed as needed to reflect new "keeper" solutions. If it's not the first orbit for a pair and the old and new grades are significantly different, that should be sufficient to decide which is the keeper. If not, you may wish to view both old and new pngfiles and make a decision based on appearance. Use the Force, Luke... Please note that subsequent programs will fail to process new entries in your updated and folded "orb6.master" for inclusion into the "html" files, and thus the webpage will not be updated correctly. This happens when, for a new entry (for example) there is a blank line above the new entry, as opposed to a full line of spaces. In order to ensure the success of new entries making it to the updated webpage you need an entire line (just copy one from nearby entries) of spaces before the line. ----- Dealing with astrometric orbits, etc: (1) Orbits with incomplete elements are added to orb6.master with a grade number of 7, interferometric and astrometric orbits with grades of 8 and 9, respectively. (2) There's of course no way to generate a pngfile for an incomplete orbit. Grade 8 and 9 orbits can be plotted, but in both cases there are no measures in the WDS to plot along with the ellipse. Those elements are put in the file "grade9orbits.5", along with a single fake measure whose separation is so small it falls on the + sign marking the location of the primary. Figures are still generated using plotorb, but the option "plot O-C lines" is set to "no". ----- Publishing the catalog to the web: These commands are currently the ones I use from serpens (which include a backup to draco), so they'll have to be modified to work from the future site of the files on draco (and astra, if that changes) cd /data/wds/orbit/Orb6 ./wdsref ./orb6ephemx ./orb6orbits ./orb6notes ./txt2sql chmod o+r * chmod g+rw * cp ../Catalog/orb6.master . date > /data/wds/orbit/Orb6/date.txt ./count ./count2 cat q1 date.txt q2 numorbs.txt q3 numpairs.txt q4 nummaster.txt q5 > orb6.html scp orb6.html astra:/web/ad/data/httpd/html/ad/wds scp *.header *.top *.gif *.png *.html *.txt *.body *.sql astra:/web/ad/data/httpd/html/ad/wds/orb6 cd /data/wds/orbit/PNG chmod go+rw * scp *.* astra:/web/ad/data/httpd/html/ad/wds/orb6/PNG cd /data/wds/orbit/Catalog chmod o+r * chmod g+rw * scp orb6.master astra:/web/ad/data/httpd/html/ad/wds/orb6 *** Note that at least for my account, permissions were an issue. When typing any "chmod" command above, I was not allowed to change permissions of any file not already attributed to me. When PNG files are created, they have limited permissions, so you will need to change them. The same goes for the "orb6.master" file. ALSO: once PNG files were copied to "astra", the permissions again became limiting. I had to log onto "astra", go to the directory into which I copied the files (including "orb6.master" just to be careful) and change permissions on the files that were "mine". *** The best way to check and see if you have truly updated Orb6 is to go and refresh the website on your won browser. ----- Remember to update, for example, 'wds000.data' with *new* orbits, in the appropriate column with "O" for orbit, or "C" if there already exists some linear entries, so that we know both exist. ================================================================================ Miscellaneous programs: circ2cat.f: Uses as input the orbits from a commission circular and reformats for orbits.1. The circular file (circ2cat.in) is extracted from the pdf version of the circular and editted; references are replaced with appropriate wdsref codes. Note that the fortran routine has a default date range for the ephemerides; this should be changed to correspond to the dates given in the circular. The output file needs to be "fleshed out" with coordinates, HD, HIP, and mags before copying to orbits.1, using information from either orb6.master (for updated orbits) or wds.summ, etc for first-time orbits. input file: circ2cat.in output file: circ2cat.out update_coordinates.f: Checks against wds.summ and updates precise coordinates and component magnitudes. Run "wc orb6.master orb6.master.new" to check files are of same size or "diff -b orb6.master orb6.master.new" for a more thorough check, then "mv orb6.master.new orb6.master" input files: ...WDS/wds.summ, orb6.master output file: orb6.master.new check_order.f: Checks that entries in orb6.master are in proper RA order (sorted by precise coordinates). Pairs not in order are listed in the file "check_order.error". Manually edit orb6.master to make corrections. (This program is good to run after updating coordinates.) input file: orb6.master output file: check_order.error quickstats.f: Does a quick check of orb6.master and tallies number of systems, orbits, and "keepers". Also gives a distribution of number of orbits by grade and declination band. I occasionally cut and paste the results (written to the terminal screen) to the file quickstats.out, to show changes in the database with time. input file: orb6.master output file: terminal (cut and paste to quickstats.out) top25.f: Counts number of orbits and keepers for each ref code. Output file top25.new gives the 3-character ref code, followed by number of orbits, number of keepers, and percentage of orbits which are keepers. This file can be sorted to determine the latest "top 25" lists. input file: orb6.master output file: top25.new txt2sql.f: Generates version of orb6orbits.txt with delimiters for SQL database. At this point, must edit output file to remove blanks. input file: orb6orbits.txt output file: orb6orbits.sql puborb.f: Generates a set of separations for a given set of orbital elements, for plotting a published orbit (as a dotted ellipse) together with a new orbit by plotorb. Points are determined at 360 equal time steps. input file: terminal (elements and file name for output) output file: name given by terminal input puborbs.f: Same as puborb, but read a set of elements (in orb6.master format) for generating many files input file: puborbs.in output files: wds??????????.refname ================================================================================