!!!EIS Object Methods An EIS data object is created with {{{IDL> data=obj_new('eis_data',filename) }}} where filename is the name of the EIS FITS file (either level-0 or level-1). To extract information from an object or manipulate the data it is necessary to use methods. A list of all methods for 'data' is available by doing: {{{IDL> data->display_methods }}} We list below some useful methods. !!Extracting a data window (getvar) This extracts a data window from the object. {{{IDL> wd=data->getvar(iwin) }}} where iwin is either the index of the window you want (beginning with 0), or the wavelength of the line you are interested in (e.g., 195.12, the correct window will be found as long as the wavelength given lies within the line window that was observed.) It is also possible to use the name of the line window (e.g. 'FE XII 195.120'), but in that case the string entered must be an exact copy of the name the line is known as in the fits file. The output is an array whose dimensions will vary depending on the type of data. For a standard raster it will be a 3D array. WARNING: be careful with using WD to generate images in an emission line. The first dimension of WD is always wavelength and the second dimension is Solar-Y. For raster data, the third dimension will be Solar-X but ordered according to the time each exposure was taken. Since EIS rasters west-to-east this ordering is the opposite to how IDL displays images. It is recommended that you use moments to generate images - see the section further down in this document. !!Pointing coordinates (getxpos, getxcen, etc.) The heliocentric coordinates for the data are given by {{{IDL> xpos=data->getxpos() IDL> ypos=data->getypos()}}} XPOS gives the X-coordinate for each slit position and YPOS gives the position for each pixel in the Y direction. The X-coordinate given includes the jitter (in X) that was recorded by the AOCS system, the pixel position given does not, but is rather based on the ycen at exposure '0'. In case the latter is desired for exposure 'n' then the (ycen(n)-ycen(0)) should be added to ypos(n) (see below). In addition, the coordinates of the reference point used in the data object are given by {{{IDL> xcen=data->getxcen() IDL> ycen=data->getycen()}}} These points are defined to be the home position of the fine mirror in X, and the middle of the physical slit i Y. Note that this definition differs from that given in the FITS file header where XCEN and YCEN refer to the center of the raster (at the beginning of the observation). Thus, the center of the raster can be accessed by {{{IDL> xcen=data->getinfo('XCEN') IDL> ycen=data->getinfo('YCEN')}}} or, perhaps more reliably (especially as concerns older data), by taking the average of the extreme values given by the xpos and ypos methods. Note that each of these is an array of same size as the number of exposures. This is because the center of the raster moves with time due to the spacecraft jitter. !!Exposure times and time routines The exposure time for each exposure of the raster is given by {{{IDL> exp_time=data->getexp() }}} There are a number of other potentially useful methods to time related phenomena: {{{IDL> ti1=data->getti_1() IDL> ti2=data->getti_2() }}} to find the shutter open (and close) times in 'TI' format. {{{IDL> tai=data->ti2tai(ti) IDL> utc=data->ti2utc(ti) IDL> sec=data->sec_from_obs_start(ti) }}} Convert 'TI' format time to atomic time units ('TAI') or UTC, if no 'ti' parameter is given, the shutter open (ti_1) times for the data object are converted. The final method 'SEC_FROM_OBS_START' computes the number of seconds from the start of observations given by the input array assumed to be in 'TI' format. {{{IDL> date_obs=data->getdate_obs() IDL> date=data->getdate() IDL> date=data->date_obs2date(date_obs) IDL> days=data->days_since_launch(date) }}} Gives the date of obsvation in 'yyyy-mm-ddThh:mm:ss.sss' format ('GETDATE_OBS') or in 'yyyymmdd' format ('GETDATE'). The 'DATE_OBS2DATE' converts the former to the latter format, if no date_obs is given the data objects date_obs is converted. 'DAYS_SINCE_LAUNCH' gives the number of days since launch, if no date is given, the data objects date is used. !!Extracting the data header The header is extracted into an object with {{{IDL> hdr_obj=data->gethdr()}}} there are then a number of methods for extracting information from the header which can be listed by doing: {{{IDL> hdr_obj->display_methods}}} If you just want to extract the full header into a text array, then do: {{{IDL> text=hdr_obj->getbte_hdr() }}} You can then use the standard routine FXPAR for extracting particular parameters, e.g., {{{IDL> date_obs=fxpar(text,'DATE_OBS') }}} Any field in the fits header can also be accessed easily by using, i.e. the above can be performed by typing {{{IDL> date_obs=hdr_obj->getinfo('DATE_OBS') }}} The 'GETINFO' method can also be called by the eis data object to access the fits header fields, in which case there is no need to open the eis header object. !!Extracting a warm pixel map for a data window eis_prep flags warm pixels on the detector during the processing by comparing with warm pixel maps stored in the Solarsoft distribution. Suppose you want to see what the warm pixel map looks like for the 195.12 data window that you're analyzing. The first step is generate the calibration object: {{{IDL> cal=data->getcal()}}} The warm pixel map is then obtained with {{{IDL> iwin=data->getwindx(195.12) IDL> wp=cal->warm_pixels(data,iwin)}}} The hot pixel map can be obtained by substituting 'warm_pixels' with 'hot_pixels'. !!Moments, Gaussian fitting and maps !Generating moments for a data window Moments are usually used as a quick means of estimating the intensity, velocity and width of an emission line without having to do Gaussian fits. They are obtained by doing: {{{IDL> m=obj_new(‘eis_moment’,data,iwin=195.12)}}} A widget will pop up allowing you to define the emission line and continuum to be used for the moments. A list of methods for 'm' can be obtained by doing: {{{IDL> m->help}}} !Gaussian fits for a data window These are done in the same way as the moments by adding the keyword /gauss: {{{IDL> m=obj_new(‘eis_moment’,data,iwin=195.12,/gauss)}}} You will again be asked to define the line and continuum for the fit. !Viewing moments and fits through maps To view the moments or Gauss fitting parameters you first need to create an IDL map from the moment object, e.g., {{{IDL> mmap=m->mk_eis_map(195.12,/vel)}}} You can also view a 'quick and dirty' map from the data object 'd' directly via, {{{IDL> mmap=d->mk_eis_map(195.12)}}} This will give an intensity map computed by summing in wavelength the pixels in the spectral window. [IDL maps|http://hesperia.gsfc.nasa.gov/~zarro/idl/maps/maps.html] are a widely used means of storing solar image data and to plot the velocity map just created, do: {{{IDL> plot_map, mmap}}} To view intensity or line width maps simply use the /int and /wid keywords for mk_eis_map.