IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 10, 2006, 10:22:42 AM (20 years ago)
Author:
magnier
Message:

adding concepts to copy from fpa to fpa

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/rel10_ifa/psModules/src/astrom/pmFPAfile.h

    r6819 r6827  
    77*  @author EAM, IfA
    88*
    9 *  @version $Revision: 1.1.2.9 $ $Name: not supported by cvs2svn $
    10 *  @date $Date: 2006-04-08 20:13:03 $
     9*  @version $Revision: 1.1.2.10 $ $Name: not supported by cvs2svn $
     10*  @date $Date: 2006-04-10 20:22:42 $
    1111*
    1212*  Copyright 2004-2005 Institute for Astronomy, University of Hawaii
     
    4040    PM_FPA_MODE_READ,
    4141    PM_FPA_MODE_WRITE,
     42    PM_FPA_MODE_INTERNAL,
    4243} pmFPAfileMode;
    4344
     
    4950typedef struct
    5051{
    51     pmFPAdepth fileDepth;
    52     pmFPAdepth dataDepth;
     52    pmFPAfileMode mode;   // is this file read, written, or only used internally?
     53    pmFPAfileType type;   // what type of data is read from / written to disk?
     54    pmFPAfileState state;  // have we opened the file, etc?
    5355
    54     psMetadata *phu;
    55     psMetadata *header;
     56    pmFPAdepth fileDepth;  // what depth in the FPA hierarchy represents a unique file?
     57    pmFPAdepth dataDepth;  // at what depth do we read/write the data segment?
    5658
    57     pmFPA *fpa;
    58     psFits *fits;
    59     psMetadata *names;
     59    pmFPA *fpa;    // for I/O files, we carry a pointer to the complete fpa
     60    psFits *fits;   // for I/O files of fits type (IMAGE, CMP, CMF), we carry a file handle
    6061
    61     char *filerule;
    62     char *filextra;
    63     char *extrule;
    64     char *extxtra;
     62    psMetadata *phu;   // pointer (view) to the current phu header
     63    psMetadata *header;   // pointer (view) to the current hdu header
    6564
    66     char *filename;
    67     char *extname;
     65    pmReadout *readout;   // for internal files, we only carry a single readout
    6866
    69     pmFPAfileType type;
    70     pmFPAfileMode mode;
    71     pmFPAfileState state;
     67    psMetadata *names;   // filenames supplied by the cmdline or detdb are saved here
     68
     69    char *filerule;   // rule for constructing a filename when needed
     70    char *filextra;   // additional information used to define filenames (context dependent)
     71    char *extrule;   // rule for constructing an extension name when needed
     72    char *extxtra;   // additional information used to define extension names (context dependent)
     73
     74    char *name;    // the name of the rule (useful for debugging / tracing)
     75    char *filename;   // the current name of an active file
     76    char *extname;   // the current name of an active file extension
     77
     78    // the following elements are used for WRITE-mode IMAGE-type pmFPAfiles to inform
     79    // the creation of a new image based on an existing image
     80    pmFPA *src;    // if an output FPA, inherit from this FPA
     81    int xBin;    // desired binning in x direction
     82    int yBin;    // desired binning in y direction
    7283}
    7384pmFPAfile;
     
    8192// load the pmFPAfile information from the camera configuration data, constructing the needed fpa structure
    8293// XXX deprecate this function?
    83 pmFPAfile *pmFPAfileConstruct (psMetadata *files, psMetadata *format, psMetadata *camera, char *name);
     94// pmFPAfile *pmFPAfileConstruct (psMetadata *files, psMetadata *format, psMetadata *camera, char *name);
    8495
    8596// open the real file corresponding to the given pmFPAfile appropriate to the current view
     
    8899// read from the real file corresponding to the given pmFPAfile for the current view
    89100bool pmFPAfileRead (pmFPAfile *file, const pmFPAview *view);
     101
     102bool pmFPAfileCreate (pmFPAfile *file, const pmFPAview *view);
    90103
    91104// write to the real file corresponding to the given pmFPAfile for the current view
     
    100113// return an image corresponding to the current readout, from the specified file.  if the pmFPAfile does not
    101114// exist, construct the image using the given size and type (save it in a pmFPAfile??)
    102 psImage *pmFPAfileReadoutImage (psMetadata *files, const pmFPAview *view, char *name, int Nx, int Ny, int type);
     115// psImage *pmFPAfileReadoutImage (psMetadata *files, const pmFPAview *view, char *name, int Nx, int Ny, int type);
     116
     117// select the readout from the named pmFPAfile; if the named file does not exist,
     118pmReadout *pmFPAfileThisReadout (psMetadata *files, const pmFPAview *view, const char *name);
     119
     120// create a file with the given name, assign it type "INTERNAL", and supply it with an image
     121// of the requested dimensions. (image only, mask and weight are ignored)
     122pmReadout *pmFPAfileCreateInternal (psMetadata *files, char *name, int Nx, int Ny, int type);
     123
     124// delete the INTERNAL file of the given name (if it exists)
     125bool pmFPAfileDropInternal (psMetadata *files, char *name);
    103126
    104127// read an image into the current view
     
    120143char *pmFPAfileNameFromRule (char *rule, pmFPAfile *file, const pmFPAview *view);
    121144
     145bool pmFPAfileCopyView (pmFPA *out, pmFPA *in, const pmFPAview *view);
     146
    122147# endif
Note: See TracChangeset for help on using the changeset viewer.