The Ivan Lightcurve Software

The Ivan Lightcurve software is continually under development. Right now it is written implicity assuming that the user knows how the code works, and is comfortable with stopping things midstream when necessary. I.e., it isn't terribly fault-tolerant, and its user interface needs some work in some places.

If you have any questions about the software, please contact Rob. For now, use this software with great caution; to avoid confusion, it's probably best if Rob still does most of the light curve building until further notice. Also, where possible please avoid using the lightcurve software to set common block variables and the like for "production" software. (For things like tests of the light curve software, fine. All the code will be more robust and will coexist more happily, however, if things like the fitting code remains a module completely independent of the light curve software (other than the simple interaction one reading the other's results).)

Contents

Overview (Please read!)
Describes what the Ivan lightcurve software is all about. This is not a simple system, and having some idea of an overview of what is going on will make understanding the rest easier.

The direc parameter
Every piece of Ivan lightcurve software requires you to get this right, so we may as well discuss it up front.

results
Output files from the Ivan lightcurve software.
ltcvparent
A description of the ltcvparent program and the lightcurve parent file, including topics on:

lookltcv
Software to look at and save the results of a lightcurve built earlier with the Ivan Lightcurve Software.

Overview of the Ivan lightcurve software

An Ivan lightcurve is built in (at least) two steps. (Well, more if you count iterations of the steps, but let's not get ahead of ourselves.) First you have to create a parent file using ltcvparent. This parent file contains a fair amount of information used by the rest of the lightcurve software, including the names of the images to go into the lightcurve, the name of the "primary reference," the position of the supernova, the position of "fiducial objects", the position of "standard stars" (not Landolt stars, just gratuitous stars).

When you create a parent file, you must give the sofware a direc parameter. This is the directory where all of the files that the lightcurve software uses to keep track of itself will go. You must be sure to give the correct direc parameter to all of the later lightcurve programs, or things will go completely haywire and wrong and you probably won't even know about it. You will publish omega=-1, you will be laughed out of the field, and you will spend the rest of your life cleaning toilets in the newly Communist Hong Kong. So, please, be careful with your direc parameters. (The fact that one must be so careful with these is one reason I don't want other software using bits of the lightcurve software for their own purposes.)

After you create the parent file, you build the light curve with bulidltcv. This program is really a driver that calls ltcvchild lots of times. ltcvchild takes the name of one ref and one new. (Effectively, it also takes as input all of the information in a parent file; however, because evil FORTRAN programming tactics have their clutches in every corner of the world, ltcvchild _assumes_ that the right ltcvparent has been run before it is run, and that this ltcvparent has properly loaded a bunch of common blocks. Brrr. Fortunately, buildltcv tends to take care of this, but still....)

Given the name of a ref and a new, ltcvchild then thinks about it for a long time. In the end, it has convolved one image so that the effective seeing of the two images matched, and calculated the flux in an aperture on the supernova and on all of the fiducial objects in both the new and the ref. (It doesn't actually subtract these fluxen, it just stores both.) It also determines the flux normalization ratio between the new and the ref, and between the new and the primary ref. It writes all of this information to a child file.

Once buildltcv has called ltcvchild as many times as necessary, in theory the lightcurve is built. In practise, it's not, because ltcvchild failed on some of the subtractions for any number of myriad reasons. But we won't go into that for an overview.

After you've built the light curve, you can look at it with lookltcv. Now, theoretically, this is fast, since the light curve is built and all it has to do is read all of the child files. In practice, however, lookltcv calls buildltcv (and then, if memory serves, calles ltcvchild explicitly additional times). If there were any problems in the lightcurve building, or if it wasn't done yet, instead of just complaining and skipping that file, the ltcvchild called by lookltcv will launch into all of its calculations... meaning that it can take even hours after you've typed "lookltcv" before you get to actually look at something. (Obviously, for an interactive program, this can be improved. It just hasn't yet.)

Lookltcv calls ltcverror which calculates any additional errors due to fiducial objects, and then can plot and save to ASCII data files the light curve of either the SN or of any of the fiducial objects.

When you've been through this once, you may want to iterate. You may want to add more images to the lightcurve, which can be done with the /change_images keyword to ltcvparent. There is an "optimum" position for the SN stored for each subtraction in the child files, so you may want to move the position of the supernova to some sort of intelligent average of these positions. This you do by first moving the parent file to a new directory, and running ltcvparent with the /change_xandy parameter, and, of course, the correct new direc parameter.

The direc Parameter

Whenever you call any of the lightcurve software, you need to give it a parmeter of the form "direc=directory", where directory is the name of a directory under $DEEPHOME/database/lightcurves. The parent file created and read by ltcvparent and the child files created and read by ltcvchild are stored in this directory. Functionally, the direc parameter is sort of a version string that indicates which version of the lightcurve for this supernova you are working on.

There are lots of catches with this. One catch is that you have to be using the latest direc parameter to work on the latest light curve. The next catch is that you have to get the right direc parmaeter for the filter you're working on. The catch after that is that you change the position of the supernova in a parent file, the child files don't magically go away, so now all of your photometry means something different from what you think it means. (This is why you should make a copy of the parent file in a fresh directory befre moving any positions around.) There must be a better way of doing this, but as yet nobody (i.e. Rob) has implemented it.

Usually, the direc parameter is something like "jun.18.97", indicating the date in which the parent file was first created in or copied to this directory. (Don't even talk to me about the year 2000.) But, it doesn't matter what it is, so long as you keep it consistent for a given lightcurve.

You can usually figure out what the proper direc parameter is for a given candidate from the Deepsearch Candidate Tracking System. Ask for the "direc_I" and "direc_R" parameters as two of the fields to view. Also look at the comments, because I've been known to write things about directories there too.


rknop@lbl.gov
Last modified: Fri Jun 20 10:46:54 1997