IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Opened 21 years ago

Closed 21 years ago

Last modified 21 years ago

#488 closed defect (fixed)

Prototype code for focal plane stuff

Reported by: Paul Price Owned by: gusciora@…
Priority: high Milestone:
Component: camera Version: unspecified
Severity: normal Keywords:
Cc: gusciora@…

Description

I will attach prototype code. It does not all meet the requirements in the
document (I made some changes based on my experience), but it comes close, and I
hope it is useful.

Attachments (4)

fpa.tar.gz (612.6 KB ) - added by Paul Price 21 years ago.
fpa.tar.gz
fpa.tar.bz2 (19.6 KB ) - added by Paul Price 21 years ago.
fpa.tar.bz2
fpa.tar.2.gz (26.9 KB ) - added by Paul Price 21 years ago.
fpa.tar.gz
fpa.tar.3.gz (50.3 KB ) - added by Paul Price 21 years ago.
fpa.tar.gz

Download all attachments as: .zip

Change History (24)

by Paul Price, 21 years ago

Attachment: fpa.tar.gz added

fpa.tar.gz

comment:1 by Paul Price, 21 years ago

Component: Phase2FocalPlane

comment:2 by robert.desonia@…, 21 years ago

Owner: changed from robert.desonia@… to gusciora@…

comment:3 by Paul Price, 21 years ago

This is the psModule prototype code that I mentioned at the meeting.

comment:4 by robert.desonia@…, 21 years ago

Owner: changed from gusciora@… to David.Robbins@…

comment:5 by Paul Price, 21 years ago

I'm in the process of updating this code to conform to the SDRS. Please let me
know if you will be working on it actively.

comment:6 by David.Robbins@…, 21 years ago

Owner: changed from David.Robbins@… to Paul Price

We are planning on folding this code in this week. Let me know when the
updates are finished so that I can proceed. Thanks.

by Paul Price, 21 years ago

Attachment: fpa.tar.bz2 added

fpa.tar.bz2

comment:7 by Paul Price, 21 years ago

attachments.isobsolete: 01

comment:8 by Paul Price, 21 years ago

Owner: changed from Paul Price to David.Robbins@…

comment:9 by Paul Price, 21 years ago

Note that the pmFPAConstruct in attachment 65 uses an old method for determining
the source of the BIASSEC and TRIMSEC (a "CELL.BIASSEC.SOURCE" keyword is in the
SDRS, but not implemented here yet) which needs to be updated.

comment:10 by Paul Price, 21 years ago

pmConfigRead calls psLogSetDestination with a value of 0, which turns off
logging, instead of directing it to stdout, as intended. See bug 508.

comment:11 by Paul Price, 21 years ago

Found a bug in pmFPAConstruct: each cell needs its own copy of the cell metadata
("concepts"), otherwise it can't add its own name.

Solution is to change getCellData:

Read data for a particular cell from the camera configuration
static psMetadata *getCellData(const psMetadata *camera,
The camera configuration

const char *cellName The name of the cell

)

{

bool status = true; Result of MD lookup
psMetadata *cells = psMetadataLookupMD(&status, camera, "CELLS");
The CELLS
if (! status) {

psError(PS_ERR_IO, false, "Unable to determine CELLS of camera.\n");
return NULL;

}

psMetadata *cellData = psMetadataLookupMD(&status, cells, cellName); The

data for the particular cell

if (! status) {

psError(PS_ERR_IO, false, "Unable to find specs for cell %s: ignored\n", cellName);

}

Need to create a new instance, so that each cell can work with its own
psMetadata *copy = psMetadataAlloc();
psMetadataIterator *iter = psMetadataIteratorAlloc(cellData, PS_LIST_HEAD,

NULL); Iterator

psMetadataItem *item = NULL; Item from iteration
while (item = psMetadataGetAndIncrement(iter)) {

if (item->type == PS_META_MULTI
item->type == PS_META_META) {

psLogMsg(func, PS_LOG_WARN, "PS_META_MULTI and PS_META_META are not

supported in a cell "

"definition --- %s ignored.\n", item->name);

continue;

}
if (! psMetadataAdd(copy, PS_LIST_TAIL, item->name, item->type, item->comment,

item->data.V)) {

psAbort(func, "Should never reach here!\n");

}

}
psFree(iter);

return copy;

}

Then, to remove memory leaks, there should be a psFree(cellData) after every
psCellAlloc.

by Paul Price, 21 years ago

Attachment: fpa.tar.2.gz added

fpa.tar.gz

comment:12 by Paul Price, 21 years ago

attachments.isobsolete: 01

comment:13 by Paul Price, 21 years ago

Cc: gusciora@… added

comment:14 by Paul Price, 21 years ago

Oh, I also updated pmFPAConstruct to implement the CELL.BIASSEC.SOURCE stuff.

Also added prototypes for the concept lookups.

comment:15 by Paul Price, 21 years ago

Reworked this to do the concept stuff at ingest, as is in the latest version of
the SDRS.

by Paul Price, 21 years ago

Attachment: fpa.tar.3.gz added

fpa.tar.gz

comment:16 by Paul Price, 21 years ago

attachments.isobsolete: 01

comment:17 by Paul Price, 21 years ago

Sorry, I'm playing with the definitions again (pmReadout and the p_pmHDU).

comment:18 by David.Robbins@…, 21 years ago

Owner: changed from David.Robbins@… to gusciora@…

comment:19 by gusciora@…, 21 years ago

Resolution: fixed
Status: newclosed

It's not quite fixed (this was prototype code, not a bug). The code should be
in the current CVS tree.

comment:20 by Paul Price, 21 years ago

The code has evolved some since the last installment recorded here. Yesterday
(14 Dec 2005) I branched psModule (pap_branch_051214). I will plug in my
current code and tidy up.

Note: See TracTickets for help on using tickets.