Archive for June, 2010

Starlink has its own image format (the NDF format, .sdf extension) which is not perhaps so convenient as the fits format. Nevertheless, there are ways to read the contents of the fits headers of your .sdf files, depending on the program you are working with. With KAPPA you can use the command: $ fitslist file.sdf […]

In order to get the mean value of column 1 (or any other) you type: $ awk ‘BEGIN{s=0;}{s=s+$1;}END{print s/NR;}’ file In order to get the standard deviation of column 1 you type: $ awk ‘{sum+=$1; sumsq+=$1*$1} END {print sqrt(sumsq/NR – (sum/NR)^2)}’ file or $ awk ‘{delta = $1 – avg; avg += delta / NR; […]

Useful small things for c-shell

By grigoris | Filed in Astronomy

> When using if statement in c-shell you have to be careful with the syntax: if (condition) then (commands) endif or if you want to add another case then if (condition) then (commands) else (commands) endif Important to remember that after “then” you must continue to a new line. > “exit” is the one option […]

Tags: , ,