Archive for 2012

Hubble will see the Venus Transit

Posted May 31, 2012 By grigoris

On June 5, 2012, Venus will pass in front of the Sun. This transit will follow numerous amateurs and professionals around the world, but it is interesting that HST will also participate in this! But how will they do it since Hubble cannot see directly the Sun? They will use instead a “mirror” and this mirror will be the Tycho crater in the Moon! Interesting …

(Credit: NASA, ESA, and A. Feild (STScI))

(Illustration Credit: NASA, ESA, and Z. Levay (STScI))

[source]

Adding transparency with GIMP

Posted April 10, 2012 By grigoris

Open your image with GIMP and:

1. Layer -> Transparency -> Add Alpha Channel
2. Select either by colour or selected area:
    a. Select -> By Colour -> click on a colour (choose additional colours by holding down Shift and clicking again)
    b. Tools -> Selection tools -> (appropriate tool) (shift-click to add more regions/colors)
4. Edit -> Clear
5. File -> Save As … -> select GIF format
    -> export: select either Indexed or Greyscale -> save as GIF: check ‘Interlace’ option

and you get a great transparent image!

[source1, source2]

Adding environmental variable in Python script

Posted March 12, 2012 By grigoris

Perhaps looking for this (after importing os):

os.environ["VARIABLE"]="/path/to/program"

This is needed for example to set the jref path in order for multidrizzle package to run through a script.

Gregorian calendar date to Julian Date number

Posted February 17, 2012 By grigoris

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 A.N., “Allen’s Astrophysical Quantities”, New York, Springer-Verlag, 2000 (4rth ed.)

AAVSO top visual observers

Posted January 28, 2012 By grigoris

I just stumbled upon an interesting article about Rod Stubbings, a visual observer who made more than 200,000th variable star observations! This, as Mike Simonsen says, places him in top five visual observers in the history of variable star astronomy.

An interesting image of the persons and their corresponding number of observations (through the year 2009-2010) is the following one.

Zip multiple directories separately

Posted January 20, 2012 By grigoris

In order to zip simultaneously a number of directories, but keep them separate, the following command will just do the job (in bash):

for i in *; do zip -r $i.zip $i; done

(caution: all directories inside which this command is executed will be zipped, so make a separate directory only to create the zip files)

[source]

PSF or DIA data from OGLE II?

Posted January 17, 2012 By grigoris

OGLE (Optical Gravitational Lensing Experiment) has a large database of photometry data available to the public. OGLE II data (second phase) are available with option to select the photometry method used, ie. PSF and DIA photometry.

PSF, a modified DOPHOT photometry process, was used during the first phase of OGLE, while the DIA process (Difference Image Analysis) was developed at the same time with phase two (OGLE II). As stated in Szymanski 2005 (AcA, 55, 43 or arXiv)  the DIA method was successful enough and yielded better results than the previous PSF method, which prompted them to recalculate all the OGLE II data and use it at the pipeline of OGLE III. In order to get though the absolute values, standard PSF photometry is applied to the DIA reference images.

So, it seems that DIA data may be the best ones to use (depending on the project and the objects of course).

VStar conflicts with java used

Posted January 16, 2012 By grigoris

VStar is a multi-platform variable star visualisation and analysis tool, developed under the CitizenSky project and the AAVSO. Its use is straightforward if java is installed. But you should be carefull what java you are using…

I tried to use VStar in two different machines running Ubuntu 10.10 64bit and Fedora 14 32bit and the first impression was that everything was set. The visualization of the data and the phase plot (epoch folding) were working but the analysis tool DCDFT (date-compensated discrete Fourier transform) was not! After some discussion with the author of the program David Benn it was found that IcedTea (a java environment) was used to run the program which “is not fully 1.6 compliant, possibly in terms of some of the Swing libraries“. So, as only the Oracle Java has been really tested, it is strongly advised to install this version in order to run the program without any issues.

Installing Oracle’s Java is simple, as there is a guide for this. A fast note of this is the following steps:

1. Download the Linux self-extracting file named jre_6u3_linux_i586.bin, or similar  (source page).

2. Make this file executable (type: chmod +x jre_6u3_linux_i586.bin).

3. Create, if it doesn’t exist, the directory /usr/java (type: mkdir /usr/java – for this we need to be root) if we want to install java in the whole system, else place it under the home directory.

4. Run the self-extracting binary (type: ./jre-6u3_linux_i586.bin). After accepting the license, the installation proceeds and finishes when “Done” is displayed.

5. We can verify the installation by checking if jre1.6.0… sub-directory is listed under the /java directory.

Then we can select VStar to open with this java environment and start digging into the light-curves!

Watec’s illumination issue

Posted January 16, 2012 By grigoris

During one observing night in December 2011, I noticed a strange “illumination” in the field, as the image from MetRec shows.

 

What is obvious from the above image is that there is too much light coming from the bottom, which affects the regions of interest, the flat-field image and the sensitivity image. As a consequence this area of the field-of-view is inactive.

Visual inspection of the lens didn’t reveal any dust. Unplugging the camera (Watec 902H2 Ultimate) and restarting MetRec a couple of times didn’t work either. It is possible, since I don’t remember well, that the camera started early enough and as it was looking to the west a lot of light was, possibly, captured by the camera and “insisted” through time, like a memory effect.

When the system started next night the “illumination” effect has left! What has happened? Nothing more than that the camera was off for many hours and the cover of the lens was on. Perhaps the last step was the critical one. Since then the system runs smoothly and I don’t intend to experiment further (but possibly may face it again…).

Bash commands to combine files

Posted January 9, 2012 By grigoris

Suppose that you want to combine two (or more) files, containing for example a series of data. There are, actually, two ways to do it in bash:

$ paste temp1 temp2 > temp
which adds the contents of the two files horizontally, like columns, and

$ cat temp1 temp2 > temp
which adds the contents vertically, one after the other.

Simple as that.