Recent Changes - Search:

Menu

editer le Menu

En cours d'écriture
Under construction

This is a user guide for SAND-3. This manual describes the steps to follow in order to calibrate SAND portable spectrometer. A more complete manual can be found on SAND's page. It describes the installation and usage of many versions of SAND spectrometer. The current manual was made to make the use of OBSAND-3B portable spectrometer easier.

SAND system installation

SAND system installation is described on this page: http://cegepsherbrooke.qc.ca/~aubema/index.php/Prof/SandcontrolEn

SVN update

The programs provided with SAND system are evolving, as we are fixing bugs and improving them. The latest versions of the programs are available with SVN. To update them, move into the svn/trunk directory and type in the following command: svn update The directory now contains the latest version of all requiered programs. You then have to copy them, as root, in /usr/local/bin directory, using the following command: cp * /usr/local/bin Older versions will be overwritten.

Here is a list of all programs that should be included in svn and copied in /usr/local/bin (there are more, but we don't use them with SAND 3, they were made to be used with another version of SAND. They can be found on google code. Most of these programs are used by other programs. Only a few are to be launched manually. SAND programs can be categorized in 3 different groups, according to their function: Data collection, data treatment and data analysis.

Arranger les numéros

Data collection:

  • ephems3
  • observe14
  • webcamimg19

Data treatment:

  • cphotometrique1
  • DelContinium.bash2
  • findspectrum.bash4
  • recallage5
  • inspectre.bash6
  • integLine7
  • keepminonwin8
  • keepmoyonwin9
  • mkGraph.bash11
  • mkGraphPng.bash12
  • nathalie13
  • resamplespectrum15
  • getLine.bash16
  • sum_calib_sp17
  • jessica22

Data analysis:

  • germaine.anal20
  • paul.anal21

Other:

  • makeSAND10

Calibration

The calibration part is useful for data treatment. It can be done before or after measurements are taken. We recommand you do it before. You should also verify once in a while if the calibration is still good, because it can change, after transportation for example. SAND calibration is divided in 2 parts: spectral calibration and photometric calibration. Spectral calibration is essential. Photometric calibration is non essential, therefore it will not be explained in this manual.

Spectral calibration is useful to associate a pixel position with a wavelenght­. This is an essential step in the installation of the system.

Spectral calibration is described on SAND's page, on section on analysis software

Using SAND

The following steps are to be done after the system is completely installed and updated. The spectrometer has to be placed aiming at zenith, as levelled as possible. Plug in the 3 cables of the box (USB, Ethernet, electrical power). You can verify if the connection is made by typing the webcam's IP adress in a web browser. To verify SAND's connection, you can type night_temperature get -t, which will give you the photometer's CCD temperature. If there is a reading, you know the connection is OK.

SAND is controlled by the program called observe. This programs works with a file (home/sand/public_html/cgi-bin/observation_list) in which you have to write the folloing information: position, site name, pictures to take. This file must be based on this example (you have to change the text in bold):

Longitude-W 71 53 45
Latitude-N 45 27 15
Site_name Beauvoir
El_deg El_min Az_deg Az_min Im_typ In_tim
90 0 90 0 sky 1
40 0 1 0 dark 1

The last lines of this file define the observation sequence. It should contain at least 1 sky image and at least 1 dark image. A sky image is a normal image taken by SAND, which will become data, after treatment. A dark image is an image taken with a closed shutter. Because light cannot arrive to CCD chip, the only signal received is the unwanted noise. This image will be substracted from each sky image.

Once the file observation_list has been edited, observe is ready to be runned. observe has to be launched from public_html directory. observe has to be launched with different options, depending on the user's needs. Here is a list of the options:

  • -m value : this is to be used with other versions of SAND, which include a mount, to move the aim of the spectrometer. The portable version (SAND-3) does not have this feature. You can set the value to off, but this is the default value.
  • -a value : This is the option to set the time to begin the observing sequence. The values can be sun for sunset, ast for astronomical twilight, or any time H:M.
  • -l value : This is to set the loop value. The value gives the number of consecutive observing nights. 0 = infinity. Default value is 0.
  • -i value : observe can be runned with a photometer, or a spectrometer. Set value to sp for spectrometer, or ph for photometer. In our case, we want to run the spectrometer. Default value is sp.
  • -d value : This is the delay option. Measurements will be taken after the specified delay (in minutes), after the specified -a option. They will stop before the same delay before sunrise.

The command might look like this: observe -a sun -l 3 -d 60
We suggest you launch observe in nohup and in background (&). Nohup is a command to make it safer; observe will not stop running if you close the terminal. The output will be redirected in the file called nohup.out. This is an example of what the command could look:
nouhup observe -a sun -l 3 -d 60

Before launching observe, make sure the CCD temperature is close to the ambient temperature, because it will start to cool down about 30°C lower than its current temperature. We do not want the cooling system to work too hard, but the cooler, the better, since it lessens the noise. To see how to stop CCD cooling, see the section on useful commands.

How does observe work

The following paragraphs describe how observe works. After being launched, observe starts cooling down the spectrometer's CCD. It then reads longitude and latitude from the file named 'observation_list' and calculates the ephemerides of the day (evening and morning astronomical twilight, sunset, sunrise, etc.) which will be used to initiate the observing sequences.

Creating the observing sequence

Observe then verifies the starting time for the sequence, using the ephemerides, the delay time (-d option) and the current time. If observe was started a few minutes or a few hours after the normal starting time, it will start immediately. It verifies if all the observations in observation_list fit within the duration of the night. It then creates a file named observation_sequence (in cgi-bin directory), with the official running sequence. You might want to verify this file once you launched observe, to make sure the observation sequence is alright. If the current time is earlier than the beginning time, observe will sleep until the time has arrived. The final step before beginning the sequence is creating the directory in which the images (.fits files) will be saved (a different one for each night). The default directory name is /home/sand/public_html/data/year/month/day/

Beginning of the observing sequence

The loop is runned over each observation line in the file observation_sequence. After having erased the ghost image of the CCD chip, the acquisition of the image begins. Observe verifies the ambient luminosity by analysing the last webcam image taken (a webcam image is taken every 15 minutes by the program webcamimg) to make sure it is really dark outside. If the luminosity is too high, observe will sleep 60 seconds before looking at the last webcam image again, until it is dark enough. Once it is dark enough, the image is taken, with the specified (in observation_list file) integration time and image type (sky or dark). When all specified images are taken, the observing sequence ends and the CCD cooling is set to off. All the images are initially saved in cgi_bin directory, then moved to the right directory (/home/sand/public_html/data/year/month/day/ after the sequence. When the number of consecutive nights (-l option) is not 1 (whether it's 0 or more than 1), observe runs the program called nathalie (described in the section on data treatment. This program initiates the treatment of the data. This step is meant to save time, since data treatment takes some time to be completed. If the number of consecutive nights is set to 1, nathalie will have to be runned manually.

Useful commands

If you run observe with -l 0 option, or if something goes wrong, and you want to stop observe: killall observe

In some cases, you might want to turn off the CCD cooling manually. Usually, you don't have to do this, but if you kill observe before it turned off the cooling, you could have to do it manually. The command to use is the following: night_temperature set -off
You have to allow some time for the CCD to get back to ambient temperature. You can check system temperature with: night_temperature get

Data treatment

Data treatment uses programs to process the images taken by the spectrometer into usable numbers. The result is the relative spectral radiance of the sky. Most of the data treatment part is automatic. The main treatment program is inspectre.bash. It can be lauched manually or by using nathalie, a program that prepares the directory before launching inspectre.bash automatically.

Starting data treatment...

...manually

inspectre.bash uses two calibration files, that need to be placed in the proper directory (/home/sand/public_html/data/year/month/day/) prior to run. Calibration files can be found in svn/trunk/Calib_files/ directory (or where you placed them after calibration). They change from one spectrometer to another. One is the spectral calibration file and the other is the photometric calibration file. Even if you do not want to use photometric calibration, you have to create a file. There is a file called flat-response in the Calib_files directory. This file can be used as a false photometric calibration file, for any instrument.

...using nathalie

nathalie is a program that was made to launch inspectre.bash easily and automatically. Before using it, you have to change the four first values in the source code, by using vi, kwrite or any other text editor. You have to enter the name of the files, and their respective path. Make sure you copy the new version of nathalie in /usr/local/bin/, as root. You should never run a program as root, since the files it creates will be protected. After this, nathalie is ready to run. You can run nathalie with no option. It will launch inspectre.bash on the pictures taken the night immediately before. This was made so when you use observe with a -l option other than 1 night, nathalie will be launched during the day, treating the pictures taken the night immediately before. If you want to use inspectre.bash on a precise date, that is not yesterday, you can use -d option. Here is a list of options that can be used with nathalie:

  • --help or -h Display nathalie user manual
  • --date [yyyy-mm-dd] or -d [yyyy-mm-dd] Run inspectre.bash' on the corresponding directory
  • -s Keep all files that were created by an earlier inspectre.bash run (when -s is not activated, this program will clean the directory before running inspectre.bash)

To use nathalie on several days of a month, use jessica. This program is described in the following section.

...using jessica

jessica was made to make the successive launch of inspectre easier. First, you have to select the days that will be treated by inspectre.bash. Then, you have to write them in a file named datesvalides_year_month.txt . You have to enter only the day, not the complete date. The days have to have 2 digits, and you have to write 1 day per line. The content of the file should look like this:

01
08
09
10
13
14
26
jessica can also be used with -g option, but this option was made for the special case of Hefei study. It was made to fit with the format of data we had, so it cannot work in any other situation. This option extracted the valid dates from a file containing AOD data.

The main loop of jessica is really simple. It launches nathalie one day at the time, to make sure not to overload the computer.

When you use jessica, make sure calibration files in nathalie are the right ones, and make sure to update the version of nathalie in /usr/local/bin/ , because this is the version jessica will use.

How does inspectre.bash work

As previously said, inspectre.bash is a program that treats the pictures taken by the spectrometer. When it is launched in a directory, it uses several smaller programs to treat all .fits files, to generate a data on light pollution, at specific wavelenghts. The data generated is the relative sky radiance.

The command to run inspectre.bash is the following:
inspectre.bash -s spectral calibration file -p photometric calibration file

There is also a -f option that was made to be used with pictures from another instrument. You will not have to use it with SAND-3.

  • Verification of image saturation: if the image has at least one saturated pixel, the whole image will not be treated. In this case, an error message will be placed in error.log, in the corresponding directory.
  • Substraction of the dark image: inspectre.bash searches for a dark image in the directory, and makes sure the integration time is the same for both the dark and the sky images.
  • Finding spectrum to extract: inspectre.bash starts with the values given in the spectral calibration file. It then adjusts the position of the spectrum, to improve precision. The final result of this step is an image containing only the right spectrum.
  • Addition of columns to generate 1D spectrum: At this point, the data is numbers, not an image anymore.
  • Spectral calibration: using the spectral calibration file, inspectre.bash associates a wavelenght with each position of the 1D spectrum.
  • Photometric calibration: In this step, inspectre.bash uses the photometric calibration file, to adjust the spectrum with the sensitivity of the instrument. As we said before, photometric calibration is not necesseray, an this treatment will not be described.
  • Correction of spectral calibration: This is a correction for an eventual spectral shift.
  • Resampling spectrum: Resamples spectrum to have data for regular wavelenghts.
  • Removing continuum radiation: inspectre.bash uses specific wavelenghts, known to be emitted only by the sun and the stars, to estimate the continuous spectrum. This continuous spectrum is removed from the measured spectrum.

Data analysis

Notes

  1. cphotometrique : Does the photometric calibration. Launched by inspectre.bash.
  2. DelContinium.bash : Deletes continuous spectrum. Launched by inspectre.bash.
  3. epehms : Calculates the ephemerides. Launched by observe.
  4. findspectrum.bash : Finds the emplacement (line up, line down) of the right spectrum in the fits image obtained from SAND-3. The program uses the spectral calibration file and adjusts the values to make them fit with the spectrum. Launched by inspectre.bash.
  5. recallage : Verifies the horizontal position of five important spectral rays in order to adjust the spectrum's horizontal position. Launched by inspectre.bash.
  6. inspectre.bash : Data treatment. More details are given in the section on data treatment. Launched manually or by nathalie.
  7. integLine : Launched by getLine.bash. Integrates selected spectral rays, with the and returns the values to getLine.bash.
  8. keepminonwin :
  9. keepmoyonwin :
  10. makeSAND : Compiles all fortran programs needed for SAND.
  11. mkGraph.bash :
  12. mkGraphPng.bash :
  13. nathalie : Prepares the corresponding folder for inspectre.bash. More information is given in the section on Data treatment
  14. observe : Controls the spectrometer. More information is given in the section on Using Sand
  15. resamplespectrum : Launched by inspectre.bash, this program resamples the spectrum to have intensity values at regular wavelenghts (every .5 nm).
  16. getLine.bash : Launched by inspectre.bash. Responsible for the integration of the selected spectral rays. Launches integline with the right values and reads its output values. There is also a filter, if the result of the integration is a negative number. This is due to a bad background substraction, which can be the result of a contamination by the sun or the moon of twilight.
  17. sum_calib_sp :
  18. webcamimg :
  19. germaine.anal :
  20. paul.anal :
  21. jessica : \\
Edit - History - Print - Recent Changes - Search
Page last modified on June 12, 2011, at 06:56 pm UTC