IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Opened 19 years ago

Closed 19 years ago

#862 closed defect (fixed)

the concepts system needs to recognize required vs unrequired concepts

Reported by: eugene Owned by: Paul Price
Priority: high Milestone:
Component: concepts Version: unspecified
Severity: normal Keywords:
Cc:

Description

if a concept if missing from an image being loaded, sometimes this is an error,
sometimes it is only information. If my program does not need to use the
concept, it is not necessary to raise an error if the concept is missing.

a possible solution is to require the calling program to specify the concepts it
will require before the concepts are parse.

Change History (1)

comment:1 by Paul Price, 19 years ago

Resolution: fixed
Status: newclosed

Added a "required" member to a concepts specification, which may be set when
registering a concept (pmConceptRegister) or by using the function
psConceptSetRequired.

If a parse error is encountered for a concept that is not marked as "required",
then the error is caught; otherwise, the error propagates.

Concepts marked as required by default:
CHIP.XPARITY
CHIP.YPARITY
CHIP.X0
CHIP.Y0
CHIP.XSIZE
CHIP.YSIZE
CELL.GAIN
CELL.READNOISE
CELL.SATURATION
CELL.BAD
CELL.XPARITY
CELL.YPARITY
CELL.READDIR
CELL.TRIMSEC
CELL.BIASSEC
CELL.XBIN
CELL.YBIN
CELL.X0
CELL.Y0
CELL.XSIZE
CELL.YSIZE

Now, most of these are simple numbers, so there's not much chance of getting a
parsing error.

Note that the *existence* of a concept cannot be asserted on in a similar manner
at read time, since they can be read at different stages (e.g., on creation, on
reading a FITS header, on opening a database handle).

Note: See TracTickets for help on using tickets.