Overview of Analysis Steps


Please complete and update this file.  It is called

	/home/panisse/www/htdocs/groupwork/analysis/overview.html


Short summary of analysis steps:

Raw Image -> Cleaning -> Cleaned Image 
	  -> Single Image Analysis/Reduction -> Reduced Image file 
	  -> Two Image Matching -> Transformation files
	  -> Summary File Builder -> Summary files
	  -> Subtraction feeder -> Subtraction Input file
	  -> Subtraction -> Subtraction Event file
	  -> Scanning ->  ScanCandidate files
	  -> Ranking -> Prime Candidate list

Detail of these steps:

Raw Data


Make sure the raw image is in a compatible format with our system


To standardize what's in an image file and enter into the database:

	loadtelescope.c		takes FITS image files and reads the header,
				standardizes the information found therein,
				and writes out a standard header file,	
				with date, time, RA and Dec, image size, 
				filter, etc.

		Author:  Julia & Ivan

		Called from: C shell

		Calling Sequence:  

		Inputs:		FITS image files...

		Outputs:	header files, called
				$DEEPHOME.database/images/___________.im.nc

		Note: 		the FITS image files are generally stored in
				/home/mss/phyd/deep/imagedone
				{this will probably change soon}




To let the observer know if the data he/she is observing is any good -- while
observing:

	monitor.pro		takes raw images and determines the 
				night's sky conditions (seeing, transmission)
				to give the observer an estimate of the
				appropriate exposure time to reach a given
				signal-to-noise ratio at a given magnitude.

				may also subtract bias and divide by flatfield
				if requested.

		Author:  Reynald
		
		Called from: IDL

		Calling Sequence:	monitor, image=filename, 
						[bias=biasfilename,
						flat=flatfieldfilename,
						,/clean
						,/calibration]

		Inputs:		Raw image
				[bias frame image
				flat field image]

		Output:		Table and/or plots for observer to choose
				exposure time.


To make flat fields:

	flatfield.pro		takes raw images and makes a flat field


		Author:  Matthew/Ivan

		Calling Sequence:	flatfield,flatinput,cleanlist=cleanlist,$
					flatimage=flatimage,header=header

		Inputs: 	FLATINPUT >>> filename of input specification
				Default is "flat.input" in the current directory
				There are many samples in $DEEPHOME/cleaning
				It should have a line like this;
				flatread= 0

				CLEANLIST >>> filename of list of images to be
				processed into flatfield.
				Default is "clean.list" in the current directory


		Outputs:	It writes out flatfield on disk. The name of this
				file is to be specified in FLATINPUT
				
				FLATIMAGE >>> super flatfield image

				HEADER >>> header of the super flatfield
				
		After making flatfields it cleans also, so one do not need to do
		the below separately if there is no problem with the super flat.
		For full description of flatfielding and surfacing look under



To turn raw images into cleaned images:

	{Program name}		takes raw images and makes cleaned images


		Author:  Matthew

		Calling Sequence:	flatfield,flatinput,cleanlist=cleanlist


		Inputs:		FLATINPUT >>> same as the above except for
				flatread= 1


		Outputs:	cleaned images, written on disk



Cleaned Images

exist at this stage in the analysis and to be loaded.


To generate an APM target-field file:

	apmlist.csh		makes list of objects within 20' of a
				single coordinate.

	gen_apmlist.csh		same, but for many target coordinates


		Author:  Isobel (with APM code?)

		
		Called from: C shell

		Calling Sequence:	amplist ...
					gen_apmlist ...?


		Input:			APM master files?  found in 
					directory....
					/home/astro9/deephome/apmlist (?)
	

		Output:			A file or many files with APM stars
					around target coord, called ...,
					and placed in directory....


		Notes:



To analyze each image by itself (before comparing images):

	reduceimage.pro		takes cleaned image and analyzes it to find:
				sky-background noise sigma,  seeing, location
				and brightness of stars, galaxies,
				transformation coefficients to take any location
				on this image to Ra and Dec coordinates, 
				magnitude "zero" to take a brightness into
				approximate magnitude system (both taken from
				the APM sky survey).

		Author:  Ivan (with APM survey matching code from Isobel)

		Called from: IDL
	
		Calling Sequence:


		Inputs:		cleaned image

		Outputs:	"image reduction files", called
			$DEEPHOME.database/{WHAT'S HERE}/___________.pho.nc
				(containing photometry lists of stars, galaxies
				and all the description of the image, 
				calibration, and transformations)

		Notes:		All files ending with .nc extension are
				netCDF format files and therefore readable
				by "ncdump"



To find the transformation from one image to another (after it's
already been "reduced" to match to the Ra/Dec coordinates):

	transimage.pro		finds transformation between reduced, cleaned,
				images, and store transformation coefficents
				in two files, one for each image matched.

		Author:	Ivan

		Called from: IDL

		Calling sequence:


		Inputs:		cleaned image, after image reduction

		Outputs:	entries into files for each image that give
				transformation coefficients to the other image.
				The files are called:
			$DEEPHOME.database/{WHAT'S HERE}/___________.trans.nc



To summarize (compile a table of) all the image files that exist:
To summarize (compile a table of) all the "Image Reduction files" that exist:

	imagesummary.c		these two programs read all of the header
	reducesummary.c		files (__________.im.nc) and the "image
				reduction files" (_________.pho.nc) and 
				prepares a file that builds a list of all of the
				images that we have so far and what we know
				about them.  This list is in the form of
				another netCDF file, called {???}.  It is
				kept updated by the following mechanism:____

	dbreadimagesummary.pro	this program reads the summary table into
				IDL structures

		Author: Ivan

		Called from: C shell
		Calling sequence:	imagesummary ...
					reducesummary...
		Input:

		Output:




		Called from: IDL
		Calling sequence:	dbreadimagesummary,...

		Inputs:

		Outputs:	creates and fills the following structures
				in IDL memory


		Notes:



Image Summary File (a database)

exist at this stage in the analysis.

To prepare a list of Reference images and New images to subtract and look 
for SNe:

	getsublist.pro		reads the image summary file and offers the
				user choice of images to use as new images 
				and matching reference images, (where these 
				images have not yet been searched for SNe. <<<
				<<<< this part is not yet done)
				You see a graphic window to choose and as you
				click on the name they get selected/un-selected
				A list of these selected images will then
				be prepared to feed the subtraction program.

		Author: Matthew

		Called from: IDL
	
		Calling Sequence: 
			getsublist,'output_file',input='input_file'
			or
			getsublist,'output_file',date=[[d1,m1,y1],[d2,m2,y2]]

		Inputs:	input_file >> You create a file with a name or names of
			new images. Here a line means a set of subtraction.
			So use a space to separate new images of the same set,
			not carriage return. (You can always add to this set so
			one new image name per set is enough.)
		
			date >>  You have to give [day,month,year] as INTEGERS
				Year should not be greater than 99. (ie, 94 not
				1994) Any image within that date will be 
				included in the list making. So in practice,
				give 0 to 2 day seperation.
		
		Outputs:	Subtraction input file, called  output_file




To subtract N reference images from M new images, and search for 3?-sigma
events that might be SNe:


	subtractimages.pro	shifts and convolves all the images to match
				the worst-seeing image, scales the images
				and then subtracts the references from the
				new's.  Scans the resulting subtraction image
				for 3?-sigma (in aperture?) events, and lists
				these in an output file.


		Author:  Alex (& Ivan & ...)

		Called from: IDL

		Calling sequence:	subtractimages,...


		Inputs:		subtraction input file, called....
				with file names in the following order, format

		Outputs:	subtraction event file, called 
					ref1ref2new1new2new3.sub.nc
				and placed in directory....


		Notes:




Subtraction Image

and

Subtraction Event file

exist at this stage in the analysis.

To scan the Event list from the subtraction program to see what looks 
interesting:

	searchscan.pro		reads in all of the images and presents
				them to scanner to show what the
				subtraction events look like.  There are
				three stages to this presentation and at
				each stage events can thrown away as 
				uninteresting:
				(1) Overview of whole image with boxes
				highlighting location of events.  The
				cuts on the events' scores can be changed
				to bring in or cut out more events, and
				events can be masked out that are clearly
				not interesting (e.g. near saturated star).
				(2) Subtraction Display shows just the
				subtraction image around each event with an
				overlay contour plot.  Poor subtractions
				can be thrown out at this stage.
				(3) Tile Display shows for each event remaining
				all of the new, reference, and subtraction
				images around the event.  Final interesting
				candidates can be chosen here and then
				saved into ScanCandidate files, along with
				scanner's rankings and comments, for future
				reference.


		Author: Matthew & Alex

		Called from: IDL
	
		Calling sequence:	searchscan,...


		Input:
	
		Output:		Files for each ScanCandidate either created
				or added to.  These are called
				{Ra_______Dec_______}.cand.nc
				and are placed in directory....


		Notes:


ScanCandidate files

exist at this stage in the analysis.

To compile and rank the candidates, to decide which of them to follow:

	cansynop.pro		reads the ScanCandidate files and presents
				them in a tabular form for inspection and
				comparison.  {Probably will need more
				than this to make decisions on candidates?}

		Author:  Alex


		Called from: IDL

		Calling Sequence:	cansynop, ...

	
		Input:		Reads all(?) of the ScanCandidate files.

		Output:		Currently, screen display?


		Notes:



To prepare lightcurves for candidates that have been followed-up:

	light.pro		these programs make lightcurves?....
	convlight.pro
	snstudy.pro

		Author:  Ariel,  Ivan,  Reynald?


		Called from: IDL

		Calling Sequence:	


		Input:

		Output:


		Notes:



To prepare finding charts for SNe and final SN candidates:

	guidestart.pro		{old version of program to be replaced soon}
				creates finding charts.


		Author: ?


		Called from: IDL

		Calling Sequence:


		Input:

		Output:


		Notes: