Tag Archive

amateur astronomy awk bash be b[e] supergiant cartoon conference convert exoplanet fedora figaro fits fun history iraf jupiter latex linux magellanic clouds massive star matplotlib meteor mypaper ondrejov observatory optical paper peblo photo photometry planet pro-am pyraf python scisoft skinakas observatory small magellanic cloud smc spectroscopy starlink talk theli ubuntu university of crete video x-ray

Fast coordinate conversion with ds9

Fast and easy conversion of a .reg file with image coordinates (x,y positions) to sky coordinates (RA,Dec;sexagesimal): ds9 image.fits -regions load input_imageCoordinates.reg -regions system wcs -regions skyformat sexagesimal -regions save outout_skyCoordinates.reg -exit with automatic exit of the program! Thanks to Alexandros M. for providing some examples! References: [1] ds9: http://ds9.si.edu/site/Home.html [2] ds9 command list: http://ds9.si.edu/ref/command.html

Bash scripting: convert float to integer

As bash is not able to handle floats the best way is to convert a float number (which is represented as a string, for example an output with awk) into an integer. To do this [1,2]: float=1.23 int=${float%.*} Refs: [1] Stackexchange.com/Unix & Linux [2] Linuxquestions.org

Gregorian calendar date to Julian Date number

JD = (1461 x (Y + 4800 + (M – 14)/12))/4 + (367 x (M -2 -12 x ((M – 14)/12)))/12 – (3 x ((Y + 4900 + (M – 14)/12)/100))/4 + D – 32075 where JD=julian date number, Y=year, M=month, D=day of month and valid for JD≥0, date after -4713 November 23. source: Cox […]

Manipulating postscript/pdf files

Postscript files (.ps) are usual and in many cases some manipulation is needed. [for more see also here] Convert from a ps to pdf file: $ ps2pdf input_file.ps output_file.ps Merge 2 or more files: $ psmerge -ooutput_file.ps input_file_1.ps input_file_2.ps [more_files] note: that -o and output_file’s name are not separated by any space Put more pages […]

Sexagesimal and radian to degree conversion

A. If you want to convert sexagesimal numbers (RA=hh:mm:ss.s Dec=±dd:mm:ss) to degrees then use these relations: RA>deg: 15 x (hh + mm/60 + ss.s/3600) Dec>deg: ±dd ± (mm/60 + ss/3600) These relations are pretty easy to remember since > 1 hour the sky rotates 15 degrees (360degrees in 24 hours) > 1 minute = 60 […]