home astro/eps 12 bio projects talks photos weather code links
 

Codescraps

The items on this page may make your life easier if used properly. I made some of them, and found some of them on the web; if you own something on this page and want it removed, please notify me.

 

OBLATE SPHEROID LATITUDE AND LONGITUDE

Use IDL function deprob to calculate the latitude and longitude on an oblate spheroidal planet, given the planet's radii, the sub-earth latitude and longitude, the north pole angle, etc. The deprob function code is fully commented. After loading it you can run deprob_demo to see how it works and generate some pretty spheroid images.

This program assumes the far field approximation. Although I solved the trigonometric relations myself, useful relations for the geometry and coordinate description of an oblate spheroid can be found at NASA's PDS Atmospheres Node.

 

 

SCIENCE / COMPUTER REFERENCE DOCUMENTS

JUPITER GEOMETRY TABLE (kmdeg.txt)

The Jupiter Geometry Table (kmdeg.txt) lists several quantities as a function of latitude: planetographic latitude, planetocentric latitude, kilometers per degree latitude and per degree longitude, conversion between east/west meters per second and degrees longitude per day, Coriolis parameter f, planetocentric radius, and latitude circle radius.

 

 

BATCH-FIX TEXT FILES

I'm sure there are simpler and slicker ways to convert Mac to Unix line breaks or to search and replace within several text files, but these are super easy once they're installed. Also, they save the original files in case you messed up somehow.

To use these, save them somewhere in your unix path, and chmod a+x them. Perl must be installed (probably already is).

Examples:
unmac dps*.txt
searchandreplace "~/papers" "~mikewong/papers" dps*.txt

  • unmac convert mac to unix line breaks (remove those ^Ms)
  • searchandreplace search and replace text simultaneously in several text files