There are a small number of changes to the xidl package that are required (or stronly recommended) for operation with FIREHOSE.  We did not check in these changes ourselves to the xidl code base as this would make them out of sync with the publicly available tarball.  You should make these changes by hand as part of the FIREHOSE installation process.

1. Inverse variance weighting bug:

In the procedure $XIDL_DIR/FIT/x_fitrej.pro, line 160:

                change from:
                         upper=fitstr.hsig, $
                to:
                         invvar=fit/fit, upper=fitstr.hsig, $

2. Fix memory leaks: add the following two lines:

In the procedure $XIDL_DIR/SPEC/ARCS/x_fndpeaks.pro, line 100 insert the following (in black; original code in gray):
      autofit = x_calcfit(xdat, FITSTR=fitstr)
      if ptr_valid(fitstr.ffit) EQ 1 then ptr_free, fitstr.ffit
  endif else begin

In the procedure $XIDL_DIR/FIT/x_fit.pro, line 211 insert the following (in black; original code in gray):
      if not keyword_set( NONRM ) then fitstr.nrm = nrm
      if ptr_valid(fitstr.ffit) EQ 1 then ptr_free, fitstr.ffit
      fitstr.ffit = ptr_new(ffit)

3. Add FIRE as an instrument option:

In the procedure $XIDL_DIR/SPEC/LONGSLIT/PRO/BIAS/long_rdnoiseimg.pro, add at or near line 100:

rn_img = transpose(rn_img)

ENDIF ELSE IF strcmp(instrument, 'FIRE') THEN BEGIN
   rn_img = fltarr(nx,ny)
   rn_img[*] = 10.0

ENDIF ELSE IF strmatch(instrument, 'IMACS') OR $

N.B. If the line numbers change in future versions of xidl (and they may already have...), I've shown in gray the lines above and below where the new code should be inserted to work properly.

[Note, this approximates the read noise for FIRE as 10e-, which is good enough for the purposes where this code is used.  For a detailed calculation of the noise model we must find the noise as a function of Fowler or SUTR reads, which will be implemented soon]


  • No labels

1 Comment

  1. Unknown User (phil.massey_1@touchstonenetwork.net)

    As of Dec 2014, I'm finding that code changes 2 and 3 are already in the current distribution of xidl.  Code change 1 had been inserted a few lines after upper=fitstr.hsig, and then commented out as being unnecessary on 10/3/2011.  So, it is possible that this page is unnecessary.