Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pkg/wfc3/Dates
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
12-Mar-2026 - PLL - Version 3.8.0
- New serial (X) CTE correction for UVIS fullframe data.

07-Jan-2026 - PLL - Version 3.7.3
- Bug fix to remove per-second in BUNIT for CRREJ output for IR data.

Expand Down
3 changes: 3 additions & 0 deletions pkg/wfc3/History
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### 12-Mar-2026 - PLL - Version 3.8.0
- New serial (X) CTE correction for UVIS fullframe data.

### 07-Jan-2026 - PLL - Version 3.7.3
- Bug fix to remove per-second in BUNIT for CRREJ output for IR data.

Expand Down
3 changes: 3 additions & 0 deletions pkg/wfc3/Updates
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Updates for Version 3.8.0 12-Mar-2026 - PLL
- New serial (X) CTE correction for UVIS fullframe data.

Updates for Version 3.7.3 07-Jan-2026 - PLL
- Bug fix to remove per-second in BUNIT for CRREJ output for IR data.

Expand Down
2 changes: 2 additions & 0 deletions pkg/wfc3/include/cte.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,10 @@ int cteHistory (WF3Info *, Hdr *);
int free_array(float **ptr, int rows, int columns);
int GetCTESwitch (WF3Info *, Hdr *);
int initCTETrl (char *, char *);
int sub_xctecor(SingleGroup *, double);

int makeRAZ(SingleGroup *, SingleGroup *, SingleGroup *);
int undoRAZ(SingleGroup *, SingleGroup *, SingleGroup *);
int writfits_r4(char *, float *, int, int);

#endif /* INCL_CTE_H */
4 changes: 2 additions & 2 deletions pkg/wfc3/include/wf3version.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/* This string is written to the output primary header as CAL_VER. */


# define WF3_CAL_VER "3.7.3 (Jan-07-2026)"
# define WF3_CAL_VER_NUM "3.7.3"
# define WF3_CAL_VER "3.8.0 (Mar-12-2026)"
# define WF3_CAL_VER_NUM "3.8.0"

#endif /* INCL_WF3VERSION_H */
1 change: 1 addition & 0 deletions pkg/wfc3/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ add_library(${PROJECT_NAME} SHARED
wf3ccd/sink.c
wf3ccd/wf3ccd.c
wf3cte/cte_dobias.c
wf3cte/cte_serial_corr.c
wf3cte/getcteflags.c
wf3cte/getctepars.c
wf3cte/getctesw.c
Expand Down
89 changes: 87 additions & 2 deletions pkg/wfc3/lib/razutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
/* These routines facilitate moving between the regular WFC3 image structre
to the RAZ image structure used in the CTE correction and Sink pixel flagging


convert a raw file to raz file: CDAB longwise amps, save data array
for comparison with what jay has during testing

Expand All @@ -23,7 +22,6 @@
*/



/*convert the sci and dq extensions to the long format*/
int makeRAZ(SingleGroup *cd, SingleGroup *ab, SingleGroup *raz){

Expand Down Expand Up @@ -216,3 +214,90 @@ int makeFloatRaz(FloatTwoDArray *x, FloatTwoDArray *raz, int group){

return(status);
}


/* This is Jay's quick-and-easy FITS writer that can be used to
write out temporary RAZ images for internal testing.
Do not use for production in pipeline.
*/
int writfits_r4(char *filename, float *data, int nx, int ny) {

typedef unsigned char Byte;

char cbuff[2880];
Byte bbuff[2880];
Byte bbufr[2880];
float rbuff[ 720];

int i;
int n;
int NRs, NRo;
int nb, NBs;

Byte btemp4[4];
Byte *pByte;

for (i=0;i<2880;i++) {
cbuff[i] = ' ';
}

/* simplest possible header */
sprintf(&cbuff[0+ 0*80],"SIMPLE = T");
sprintf(&cbuff[0+ 1*80],"BITPIX = -32");
sprintf(&cbuff[0+ 2*80],"NAXIS = 2");
sprintf(&cbuff[0+ 3*80],"NAXIS1 = %20d",nx);
sprintf(&cbuff[0+ 4*80],"NAXIS2 = %20d",ny);
sprintf(&cbuff[0+ 5*80],"DATATYPE= 'REAL*4' ");
sprintf(&cbuff[0+ 6*80],"COMMENT ");
sprintf(&cbuff[0+ 7*80],"COMMENT Jay's Quickie ");
sprintf(&cbuff[0+ 8*80],"COMMENT C fits writer ");
sprintf(&cbuff[0+ 9*80],"COMMENT writfits_r4() ");
sprintf(&cbuff[0+10*80],"COMMENT ");
sprintf(&cbuff[0+11*80],"END ");

for (i=0;i<2880;i++) {
if (cbuff[i]==0) {
cbuff[i] = ' ';
}
}

FILE *fp = fopen(filename,"w");
fwrite(cbuff,2880,1,fp);

NRs = nx*ny;
NBs = 1 + ((nx*ny-1)/720); /* the -1 covers the case where the data have an exact multiple
of 2880 bytes; it can happen! */

/* distill the data into 2880-byte buffers
we must flip the bytes, since INTEL machines
have the opposite Endian-ness to the FITS
standard
*/
for (nb=0;nb<NBs;nb++) {
NRo = nb*720;
for (n=0;n<720;n++) {
rbuff[n] = 0;
if (NRo+n<NRs) {
rbuff[n] = data[NRo+n];
} /* make sure we haven't gone off the end */
}
pByte = (Byte *)rbuff;
for (n=0;n<2880;n++) {
bbuff[n] = *(pByte+n);
}
for (n=0;n<720;n++) {
btemp4[0] = bbuff[0+n*4];
btemp4[1] = bbuff[1+n*4];
btemp4[2] = bbuff[2+n*4];
btemp4[3] = bbuff[3+n*4];
bbufr[0+n*4] = btemp4[3];
bbufr[1+n*4] = btemp4[2];
bbufr[2+n*4] = btemp4[1];
bbufr[3+n*4] = btemp4[0];
}
fwrite(bbufr,2880,1,fp);
}
fclose(fp);

return(0);
}
6 changes: 2 additions & 4 deletions pkg/wfc3/lib/wf3cte/cte_dobias.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,19 @@ int doCteBias (WF3Info *wf3, SingleGroup *x) {
int scilines; /* number of lines in science image */
int i, j;
int update;
int dimx, dimy;
int dimx;
int straddle=0;
int overstart=0;
int offsetx=0;
int offsety=0;

dimx = x->sci.data.nx;
dimy = x->sci.data.ny;

trlmessage("CTE: Subtracting BIACFILE: %s for imset %d",wf3->biac.name, x->group_num);

initSingleGroupLine (&y);
scilines = x->sci.data.ny;


/* Initialize local variables */
rx = 1;
ry = 1;
Expand Down Expand Up @@ -92,7 +90,7 @@ int doCteBias (WF3Info *wf3, SingleGroup *x) {
*/

if (wf3->verbose){
trlmessage("Image has starting location of %d,%d in the reference image",x0,y0);
trlmessage(" Image has starting location of %d,%d in the reference image", x0, y0);
}

/* Subtract the bias image from x. */
Expand Down
Loading
Loading