#################################### Exposure Time Calculator for Chimera Author: Alex James - SUNY Geneseo, USA #################################### Table of Contents """"""""""""""""""""""""""" 1. Introduction 2. How-To 3. Output 1. Introduction """""""""""""""""""""""" The Exposure Time Calculator(ETC) written for Chimera utilizes the IRAF task ccdtime and packages it in a format with which Chimera can communicate. Contrary to the name, the ETC is also able to output signal to noise ratio and star magnitudes. 2. How-To """"""""""""""""""" The ETC class has two methods: ccdtime() and getParams(). The latter is a simple helper function that asks IRAF what the current saved parameters are for the ccdtime task. It saves the current parameters in a list then gets the field name for each parameter and saves that in a list as well. Finally, it creates a dictionary from the two lists with the keywords being the parameter field names and the values being the parameter values. The ccdtime() method is much more complicated and is where the all the work is done. This method requires an arguement that specifies what data the user wishes for it to output: method='time' will set the time parameter to 'INDEF' which tells the IRAF task to output the exposure time. If this method is chosen the 'snr' and 'magnitude' parameters MUST be defined (as usual snr must be between 0 and 100000 and magnitude must be between -40 and 40) or the method will crash. Similarly, method='magnitude' will set the magnitude parameter to 'INDEF' which tells the IRAF task to output the star magnitude. Again, to use this method the 'time' (a value between 0 and 100000) and 'snr' MUST be defined. And finally, method='snr' will set the snr parameter to 'INDEF' and will output signal to noise ratios. For emphasis, be sure 'time' and 'magnitude' are defined! In addition to the method arguement, the ccdtime method can take anywhere from 0 to 15 more arguements depending on how many parameters the user wishes to change from the currently saved ones. The available parameters are as follows: time See above for explaination. magnitude See above for explaination. snr See above for explaination. database This parameter indicates which database file the user wishes to use. The database file contains vital information about the telescope the user is using such as the ccd gain or cdd pixel scale. This parameter must be called in the format 'ccdtime$kpno.dat' where kpno.dat is the text configuration file that is save in the ccdtime directory of the IRAF install. telescope The telescope name must be input exactly as it appears in the database file however, capitalization does not matter. If '?' is input for this parameter or if the current save value of telescope is '?', the terminal will print a list available telescopes from the database file the user inputs or, if the user did not input one, from the current saved database file. After printing a list of the available telescopes, ETC will ask which telescope the user wishes to use. detector Same as for telescope except input the name of the ccd as it appears in the database file. The same applies from telescope for a '?' input. sum This parameter is the on ccd summing or binning factor. seeing The seeing is the current photometric seeing(FWHM) given in arcseconds. airmass This parameter is the airmass of the star the user wishes to observe. phase This parameter is the current phase of the moon. 0 and 28 indicate a new moon while 14 indicates a full moon. f1-f5 IRAF's ccdtime has the capability to compute data for up to 5 different filters. The user must make sure that the database file has information for the filters they wish to specify. **Notice that each of these arguement keywords exactly match those in the IRAF parameter list.** For more information please see the IRAF ccdtime help menu. If for some reason the input method arguement does not match 'time', 'magnitude', or 'snr' ETC will ask the user to reinput which method they would like to use. ETC will continue to ask this until a valid method is input. Also, if no filter is provided in the initial method arguements ETC will ask which filters in which the user wishes to have data output. Examples: ccdtime(method='magnitude',database='ccdtime$kpno.dat',telescope='?',detector='?',snr=18,time=56) In this example the user wants for ccdtime to output magnitudes of stars given a signal to noise ratio of 18 and an exposure time of 56 seconds. The user also sets the database file to kpno.dat, but sets telescope and detector to '?' presumably because they do not know the exact name of the telescope and ccd they are using. No filters are specified so ETC will ask the user what filters to use when it runs. All other paramters not specified here, but described above, will be used from the current saved paramters. ccdtime(method='time',telescope='?',detector='?',magnitude=17,airmass=1.7,f1='U',f2='V',f3='I') In this example the user wants for ccdtime to output exposure times in the U, V, and I filters given a magnitude of 17 and an airmass of 1.7. The database file is not specified, but the user wants double check the exact names of the detector and telescope before inputting them. ccdtime(method='snr',magnitude=19,time=30,phase=20) In this example most of the currently saved paramters will be used, but the user does change the magnitude to 19, the exposure time to 30 seconds, and the moon phase to 20 to output signal to noise ratio. The user will be prompted for filters. 3. Output """"""""""""""""" ETC returns a simple list of float values varying from 1 element to 5 depending on how many filters the user requested data for. In the event that ETC crashes, the terminal will output and error message generated by IRAF. These error messages are typically very descriptive and tell the user which input arguement it didn't like. A few examples are shown below. IRAF task terminated abnormally ERROR (741, "Cannot open file (ccdtime$k.dat)") This message occured because the database file 'k.dat' does not exist or it is not in the iraf ccdtime directory. The easiest way to find the iraf ccdtime directory is to search your computer for kpno.dat(the standard database file installed with IRAF). IRAF task terminated abnormally ERROR (1, "DBSTR: Database paramter not found (J)") This message occured because the filter 'J' was does not exist in the specified database file. KeyError: 'filter1' This message occured because the user tried to input a parameter 'filter1' that does not match one of the IRAF field names. The user should have used 'f1' in this case.