IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 23183


Ignore:
Timestamp:
Mar 4, 2009, 12:13:48 PM (17 years ago)
Author:
Paul Price
Message:

Added new output file rule for ppImage: PPIMAGE.OUTPUT.DETREND. It differs from the usual PPIMAGE.OUTPUT only in the choice of compression. The idea is that for images with a fair gradient across them (like our new flats), we want to force the choice of bscale=1,bzero=32768, because the standard deviation of the image doesn't provide a good basis for choosing these. This file rule should now be enabled for detrend types that signal a fair bit of light in the process and residual stages.

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/detrend_process_imfile.pl

    r22430 r23183  
    8181my $jpeg_recipe = $ipprc->reduction($reduction, uc($det_type) . '_JPEG_IMAGE'); # Recipe name for JPEG
    8282
     83# The output file rule name depends on the detrend type
     84my $FILERULES = { 'FLATMASK'         => undef,
     85                  'DARKMASK'         => undef,
     86                  'MASK'             => undef,
     87                  'BIAS'             => undef,
     88                  'DARK'             => undef,
     89                  'DARK_PREMASK'     => undef,
     90                  'SHUTTER'          => 'PPIMAGE.OUTPUT.DETREND',
     91                  'FLAT_PREMASK'     => 'PPIMAGE.OUTPUT.DETREND',
     92                  'DOMEFLAT_PREMASK' => 'PPIMAGE.OUTPUT.DETREND',
     93                  'SKYFLAT_PREMASK'  => 'PPIMAGE.OUTPUT.DETREND',
     94                  'FLAT_RAW'         => 'PPIMAGE.OUTPUT.DETREND',
     95                  'DOMEFLAT_RAW'     => 'PPIMAGE.OUTPUT.DETREND',
     96                  'SKYFLAT_RAW'      => 'PPIMAGE.OUTPUT.DETREND',
     97                  'FLAT'             => 'PPIMAGE.OUTPUT.DETREND',
     98                  'DOMEFLAT'         => 'PPIMAGE.OUTPUT.DETREND',
     99                  'SKYFLAT'          => 'PPIMAGE.OUTPUT.DETREND',
     100                  'FRINGE'           => undef,
     101              };
     102
    83103&my_die("Couldn't find input file: $input_uri\n", $det_id, $exp_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($input_uri);
    84104
     
    105125    $command .= " -recipe PPSTATS DETSTATS";
    106126    $command .= " -stats $outputStats";
     127    $command .= " -F PPIMAGE.OUTPUT $FILERULES{$det_type}" if defined $FILERULES{$det_type};
     128
    107129    $command .= " -tracedest $traceDest -log $logDest";
    108130    $command .= " -threads $threads" if defined $threads;
  • trunk/ippScripts/scripts/detrend_resid_imfile.pl

    r22430 r23183  
    124124};
    125125
     126# The output file rule name depends on the detrend type
     127my $FILERULES = { 'FLATMASK'         => 'PPIMAGE.OUTPUT.RESID',
     128                  'DARKMASK'         => 'PPIMAGE.OUTPUT.RESID',
     129                  'MASK'             => 'PPIMAGE.OUTPUT.RESID',
     130                  'BIAS'             => 'PPIMAGE.OUTPUT.RESID',
     131                  'DARK'             => 'PPIMAGE.OUTPUT.RESID',
     132                  'DARK_PREMASK'     => 'PPIMAGE.OUTPUT.RESID',
     133                  'SHUTTER'          => 'PPIMAGE.OUTPUT.DETREND',
     134                  'FLAT_PREMASK'     => 'PPIMAGE.OUTPUT.DETREND',
     135                  'DOMEFLAT_PREMASK' => 'PPIMAGE.OUTPUT.DETREND',
     136                  'SKYFLAT_PREMASK'  => 'PPIMAGE.OUTPUT.DETREND',
     137                  'FLAT_RAW'         => 'PPIMAGE.OUTPUT.DETREND',
     138                  'DOMEFLAT_RAW'     => 'PPIMAGE.OUTPUT.DETREND',
     139                  'SKYFLAT_RAW'      => 'PPIMAGE.OUTPUT.DETREND',
     140                  'FLAT'             => 'PPIMAGE.OUTPUT.DETREND',
     141                  'DOMEFLAT'         => 'PPIMAGE.OUTPUT.DETREND',
     142                  'SKYFLAT'          => 'PPIMAGE.OUTPUT.DETREND',
     143                  'FRINGE'           => 'PPIMAGE.OUTPUT.RESID',
     144              };
     145
    126146# outroot examples (HOST components must be set)
    127147# file://data/ipp004.0/gpc1/20080130
     
    149169    $command .= " -recipe JPEG $jpeg_recipe";
    150170    $command .= " -recipe PPSTATS RESIDUAL";
    151     $command .= " -F PPIMAGE.OUTPUT PPIMAGE.OUTPUT.RESID";
     171    $command .= " -F PPIMAGE.OUTPUT $FILERULES{$det_type}" if defined $FILERULES{$det_type};
    152172    $command .= " -stats $outputStats";
    153173    $command .= " -tracedest $traceDest -log $logDest";
  • trunk/ippconfig/recipes/filerules-mef.mdc

    r21370 r23183  
    128128PPIMAGE.OUT.WT.SPL      OUTPUT {OUTPUT}.{CHIP.NAME}.wt.fits      VARIANCE  NONE       CHIP       TRUE      SPLIT
    129129PPIMAGE.OUTPUT.DETMASK  OUTPUT {OUTPUT}.fits                     IMAGE     MASK       CHIP       TRUE      MEF
     130PPIMAGE.OUTPUT.DETREND  OUTPUT {OUTPUT}.fits                     IMAGE     COMP_DET   CHIP       TRUE      MEF
    130131PPIMAGE.OUTPUT.RESID    OUTPUT {OUTPUT}.b0.fits                  IMAGE     COMP_SUB   CHIP       TRUE      MEF
    131132PPIMAGE.CONFIG          OUTPUT {OUTPUT}.{CHIP.NAME}.ppImage.mdc  TEXT      NONE       CHIP       TRUE      NONE
  • trunk/ippconfig/recipes/filerules-simple.mdc

    r21370 r23183  
    9191PPIMAGE.OUTPUT.VARIANCE OUTPUT {OUTPUT}.wt.fits      VARIANCE  NONE       FPA        TRUE      SIMPLE
    9292PPIMAGE.OUTPUT.DETMASK  OUTPUT {OUTPUT}.fits         IMAGE     NONE       FPA        TRUE      SIMPLE
     93PPIMAGE.OUTPUT.DETREND  OUTPUT {OUTPUT}.fits         IMAGE     NONE       FPA        TRUE      SIMPLE
    9394PPIMAGE.OUTPUT.RESID    OUTPUT {OUTPUT}.fits         IMAGE     NONE       FPA        TRUE      SIMPLE
    9495PPIMAGE.CONFIG          OUTPUT {OUTPUT}.ppImage.mdc  TEXT      NONE       FPA        TRUE      NONE
  • trunk/ippconfig/recipes/filerules-split.mdc

    r21531 r23183  
    100100PPIMAGE.OUTPUT.VARIANCE OUTPUT {OUTPUT}.{CHIP.NAME}.wt.fits      VARIANCE  COMP_WT    CHIP       TRUE      NONE
    101101PPIMAGE.OUTPUT.DETMASK  OUTPUT {OUTPUT}.{CHIP.NAME}.fits         IMAGE     DET_MASK   CHIP       TRUE      NONE
     102PPIMAGE.OUTPUT.DETREND  OUTPUT {OUTPUT}.{CHIP.NAME}.fits         IMAGE     COMP_DET   CHIP       TRUE      NONE
    102103PPIMAGE.OUTPUT.RESID    OUTPUT {OUTPUT}.{CHIP.NAME}.fits         IMAGE     COMP_SUB   CHIP       TRUE      NONE
    103104PPIMAGE.CONFIG          OUTPUT {OUTPUT}.{CHIP.NAME}.ppImage.mdc  TEXT      NONE       CHIP       TRUE      NONE
    104 
    105 #PPIMAGE.OUTPUT          OUTPUT {OUTPUT}.{CHIP.NAME}.fits         IMAGE     NONE  CHIP       TRUE      NONE
    106 #PPIMAGE.OUTPUT.MASK     OUTPUT {OUTPUT}.{CHIP.NAME}.mk.fits      MASK      NONE  CHIP       TRUE      NONE
    107 #PPIMAGE.OUTPUT.VARIANCE OUTPUT {OUTPUT}.{CHIP.NAME}.wt.fits      VARIANCE  NONE  CHIP       TRUE      NONE
    108 #PPIMAGE.OUTPUT.DETMASK  OUTPUT {OUTPUT}.{CHIP.NAME}.fits         IMAGE     NONE  CHIP       TRUE      NONE
    109105                                                                                               
    110106PPIMAGE.CHIP            OUTPUT {OUTPUT}.{CHIP.NAME}.ch.fits      IMAGE     COMP_IMG   CHIP       TRUE      NONE
     
    124120                                                                                                       
    125121PPIMAGE.STATS           OUTPUT {OUTPUT}.{CHIP.NAME}.stats        STATS     NONE       CHIP       TRUE      NONE
    126                                                                                                        
     122
    127123## note: these use the  same output naming convention since they are used for different ppMerge runs
    128 PPMERGE.OUTPUT.MASK     OUTPUT {OUTPUT}.{CHIP.NAME}.fits         MASK      NONE       CHIP       TRUE      NONE
     124PPMERGE.OUTPUT.MASK     OUTPUT {OUTPUT}.{CHIP.NAME}.fits         MASK      DET_MASK   CHIP       TRUE      NONE
    129125PPMERGE.OUTPUT.BIAS     OUTPUT {OUTPUT}.{CHIP.NAME}.fits         IMAGE     NONE       CHIP       TRUE      NONE
    130126PPMERGE.OUTPUT.DARK     OUTPUT {OUTPUT}.{CHIP.NAME}.fits         DARK      NONE       CHIP       TRUE      NONE
  • trunk/ippconfig/recipes/fitstypes.mdc

    r21534 r23183  
    1919# STDEV.NUM(F32) is the number of standard deviations to the edge (when SCALING = STDEV_NEGATIVE|STDEV_POSITIVE)
    2020# FLOAT(STR) is the name of a custom floating-point type
     21
     22# Compressed detrend
     23COMP_FLAT       METADATA
     24        BITPIX          S32     16
     25        SCALING         STR     MANUAL
     26        BSCALE          F32     1.0
     27        BZERO           F32     32768.0
     28        COMPRESSION     STR     RICE
     29        TILE.X          S32     0
     30        TILE.Y          S32     1
     31        TILE.Z          S32     1
     32        NOISE           S32     8
     33END
    2134
    2235DET_IMAGE       METADATA
Note: See TracChangeset for help on using the changeset viewer.