Go to the U of M home page
School of Physics & Astronomy
School of Physics and Astronomy Wiki

User Tools


APS / EtaCar

Adding Observations to the EtaCar database

This page describes how to add fits.gz files in /archive/new_release to the public EtaCar database/website.

You want to complete the following tasks on Amonra, as that's where the database is.


The website uses two types of files it needs to know about and have.

  1. The actual fits files, at /archive/new_release
  2. The preview images, at /archive/new_release_pics

It is assumed that the files in 1 already exist, and the files in 2 are generated from the files in 1. Furthermore, the database needs information from both files.

Adding FITS files to the database

So, first, to add the actual fits files to the database, preview images ignored for the moment:

In /home/jtolds/fitsfiles, there is 4 significant perl scripts: insertline-hstimages.pl, insertline-spectra.pl, updateline-hstimages.pl, and updateline-spectra.pl

In theory, the difference between the insert and update scripts should be just the style of generated SQL. As of 5/28/8, the hstimage scripts are in sync in this regard, while the spectra ones are not.

insertline-spectra.pl takes a list of fits.gz files as arguments and outputs SQL. you should just be able to dump this into the amonra EtaCar MySQL database.

Observation notes

If Roberta or Kris or John want to make a note on an observation, /software/noteupdater is where to start

Generating preview images

Preview images need to be cropped, and John Martin wrote a routine to determine where. /home/jtolds/archivefiles/imagegeneration/image_rowdb/getimgarea is a binary John made does this. create_row_info.pl in the same directory is a script that I wrote to wrap getimgarea. It takes a list of fits.gz files as args, and outputs SQL on STDOUT and tabular data on STDERR. The SQL is to be dumped into the EtaCar db, and the tabular data is used by the preview image creation program.

In /home/jtolds/archivefiles/imagegeneration/make_pics, there are more important scripts. create-imagebounds will regenerate the tabular data from stderr of the previous program from the database in case you lost it. create-preview4 takes the tabular data file as an argument and creates preview images in the appropriate places. create-preview4-hacknstack is the same, except it first uses the hacknstack binary that John wrote. This is useful for very wide and short observations. Instead of having to scroll right-to-left, the image is cut off at a certain amount of observation pixels and wrapped.

As of 5/28/8, there is also a create-preview3 script, but I believe this is just an outdated version.

Startup / Shutdown Procedure

Attention: This section describes how to power off the APS/Eta lab systems in the event of an emergency. Please follow the directions as closely as possible to ensure a correct, safe shutdown.

Controlled Shutdown

When the power goes off, or another reason arises to shutdown the network, the following order of shutdowns should be observed unless there is a sense of urgency where the battery power may run out soon, then skip the workstations and shut down the servers first. No harm will occur to the workstations.


In no particular order:

  • enki
  • anubis
  • horus
  • ea
  • bast
  • set
  • imhotep


The servers should be shutdown in the following order:

  1. amonra
  2. isis
  3. osiris

Shutdown Instructions

If the computer is a workstation, it can be shutdown by powering on the monitor and selecting the 'Shutdown' option in the user interface. The machine will probably show either a graphical or text based shutdown. At the conclusion of shutdown, the machine will either power itself off or inform you to do so.

Note: The following also works on workstations.

If the computer is a server, you will have to login as the `root` user or, alternatively, you can login as yourself and use the su command. After you become root, run the following command: shutdown 0. The machine will show a text-based shutdown as it stops all services. At the conclusion, it will either power itself off or prompt you to do so.

Fast Shutdown Instructions

If the computers, for whatever reason, need to be shutdown quickly, observe the following procedure:

  1. Find the keyboard for the computer.
  2. Hit the keys Ctrl-Alt-Print Screen-S at the same time.
  3. Hit the keys Ctrl-Alt-Print Screen-U at the same time.
  4. Hit the keys Ctrl-Alt-Print Screen-O at the same time.

If the computer does not start shutting down after a few seconds: 5. Hit the keys Ctrl-Alt-Print Screen-L at the same time.

Bring up the Network

Start the computers in the following order.

  1. osiris (wait for it to finish before continuing)
  2. isis
  3. amonra (see note below)
  4. ea
  5. set
  6. imhotep
  7. enki
  8. anubis

Amonra requires a monitor to be plugged into it to complete its bootup. Once it has restarted, the monitor can be reconnected to imhotep.


If there is a problem during either the shutdown or restarting of the network, please contact Matt Mix:

(608) 783 8341 cell


groups/aps/home.txt · Last modified: 2009/01/08 20:33 by clayton