MOONS Pipeline Reference Manual 0.13.2
moo_single.c
1/*
2 * This file is part of the MOONS Pipeline
3 * Copyright (C) 2002-2016 European Southern Observatory
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20#ifdef HAVE_CONFIG_H
21#include <config.h>
22#endif
23
24/*-----------------------------------------------------------------------------
25 Includes
26 -----------------------------------------------------------------------------*/
27#include <math.h>
28#include <cpl.h>
29#include <hdrl.h>
30#include "moo_pfits.h"
31#include "moo_badpix.h"
32#include "moo_single.h"
33#include "moo_det.h"
34#include "moo_pfits.h"
35#include "moo_fits.h"
36#include "moo_utils.h"
37/*----------------------------------------------------------------------------*/
51/*----------------------------------------------------------------------------*/
52
55/*-----------------------------------------------------------------------------
56 Function codes
57 -----------------------------------------------------------------------------*/
58
59/*----------------------------------------------------------------------------*/
71/*----------------------------------------------------------------------------*/
72moo_single *
74{
75 cpl_ensure(ntas <= 2, CPL_ERROR_ILLEGAL_INPUT, NULL);
76
77 moo_single *res = (moo_single *)cpl_calloc(1, sizeof(moo_single));
78 res->badpix_mask = MOO_BADPIX_GOOD;
79 res->type = type;
80 res->ntas = ntas;
81 const char *extname = moo_detector_get_extname(type, ntas);
82 res->extname = extname;
83 res->header = cpl_propertylist_new();
84 return res;
85}
86
87/*----------------------------------------------------------------------------*/
103/*----------------------------------------------------------------------------*/
104moo_single *
105moo_single_create(const char *filename, moo_detector_type type, int ntas)
106{
107 cpl_ensure(filename != NULL, CPL_ERROR_NULL_INPUT, NULL);
108
109 const char *extname = NULL;
110 moo_single *single = NULL;
111 cpl_size ext_num = -1;
112 moo_try_check(extname = moo_detector_get_extname(type, ntas), " ");
113 moo_try_check(ext_num = cpl_fits_find_extension(filename, extname), " ");
114
115 if (ext_num > 0) {
116 cpl_propertylist *header = cpl_propertylist_load(filename, ext_num);
117
118 /* remove unsupported KW */
119 cpl_propertylist_erase_regexp(header, "CONTINUE*", 0);
120 if (!cpl_propertylist_has(header, MOO_PFITS_CUNIT1)) {
121 cpl_propertylist_append_string(header, MOO_PFITS_CUNIT1,
122 MOO_SINGLE_CUNIT1);
123 }
124 int naxis = moo_pfits_get_naxis(header);
125 if (naxis > 0) {
126 single = moo_single_new(type, ntas);
127 single->filename = filename;
128 cpl_propertylist_append(single->header, header);
129 }
130 cpl_propertylist_delete(header);
131 }
132moo_try_cleanup:
133 return single;
134}
135
136/*----------------------------------------------------------------------------*/
150/*----------------------------------------------------------------------------*/
151cpl_error_code
152moo_single_load(moo_single *self, unsigned int level)
153{
154 cpl_ensure_code(self != NULL, CPL_ERROR_NULL_INPUT);
155
156 self->badpix_mask = level;
157
158 if ((self->filename != NULL) && (self->extname != NULL)) {
159 if (self->header == NULL) {
160 cpl_size extnum =
161 cpl_fits_find_extension(self->filename, self->extname);
162 if (extnum > 0) {
163 self->header = cpl_propertylist_load(self->filename, extnum);
164 }
165 }
166 if (self->qual == NULL) {
167 const char *extname =
168 moo_detector_get_qual_extname(self->type, self->ntas);
169 cpl_size extnum = cpl_fits_find_extension(self->filename, extname);
170 if (extnum > 0) {
171 self->qual =
172 cpl_image_load(self->filename, CPL_TYPE_INT, 0, extnum);
173 }
174 }
175 if (self->image == NULL) {
176 cpl_image *data = NULL;
177 cpl_image *err = NULL;
178
179 data =
180 moo_fits_load_extension_image(self->filename, NULL,
181 self->extname, CPL_TYPE_DOUBLE);
182 err = moo_fits_load_extension_image(self->filename, MOO_ERR,
183 self->extname, CPL_TYPE_DOUBLE);
184
185 if (data != NULL && err != NULL) {
186 self->image = hdrl_image_create(data, err);
187 cpl_image_delete(data);
188 cpl_image_delete(err);
189 }
190 }
191 }
192 if (self->image != NULL && self->qual != NULL) {
193 cpl_mask *mask = hdrl_image_get_mask(self->image);
194 moo_badpix_to_mask(self->qual, mask, level);
195 }
196
197 return CPL_ERROR_NONE;
198}
199
200/*----------------------------------------------------------------------------*/
209/*----------------------------------------------------------------------------*/
210void
211moo_single_delete(moo_single *self)
212{
213 if (self != NULL) {
214 if (self->header != NULL) {
215 cpl_propertylist_delete(self->header);
216 }
217 if (self->image != NULL) {
218 hdrl_image_delete(self->image);
219 }
220 if (self->qual != NULL) {
221 cpl_image_delete(self->qual);
222 }
223 cpl_free(self);
224 }
225}
226
227/*----------------------------------------------------------------------------*/
237/*----------------------------------------------------------------------------*/
238cpl_image *
239moo_single_get_data(moo_single *self)
240{
241 cpl_ensure(self != NULL, CPL_ERROR_NULL_INPUT, NULL);
242 cpl_image *res = NULL;
243
244 if (self->image != NULL) {
245 res = cpl_image_duplicate(hdrl_image_get_image(self->image));
246 }
247 return res;
248}
249
250/*----------------------------------------------------------------------------*/
260/*----------------------------------------------------------------------------*/
261cpl_image *
262moo_single_get_err(moo_single *self)
263{
264 cpl_ensure(self != NULL, CPL_ERROR_NULL_INPUT, NULL);
265
266 cpl_image *res =
267 moo_fits_load_extension_image(self->filename, MOO_ERR, self->extname,
268 CPL_TYPE_DOUBLE);
269 return res;
270}
271
272/*----------------------------------------------------------------------------*/
285/*----------------------------------------------------------------------------*/
286cpl_error_code
287moo_single_apply_mask(moo_single *self, cpl_mask *mask, unsigned int level)
288{
289 cpl_ensure_code(self != NULL, CPL_ERROR_NULL_INPUT);
290 cpl_ensure_code(mask != NULL, CPL_ERROR_NULL_INPUT);
291
292 cpl_image *qual = moo_single_get_qual(self);
293 moo_mask_to_badpix(qual, mask, level);
294 if (self->image) {
295 cpl_mask *hmask = hdrl_image_get_mask(self->image);
296 cpl_mask_or(hmask, mask);
297 }
298 return CPL_ERROR_NONE;
299}
300/*----------------------------------------------------------------------------*/
310/*----------------------------------------------------------------------------*/
311cpl_image *
312moo_single_get_qual(moo_single *self)
313{
314 cpl_ensure(self != NULL, CPL_ERROR_NULL_INPUT, NULL);
315 return self->qual;
316}
317
318/*----------------------------------------------------------------------------*/
328/*----------------------------------------------------------------------------*/
329hdrl_image *
330moo_single_get_image(moo_single *self)
331{
332 cpl_ensure(self != NULL, CPL_ERROR_NULL_INPUT, NULL);
333
334 return self->image;
335}
336
337/*----------------------------------------------------------------------------*/
347/*----------------------------------------------------------------------------*/
348cpl_error_code
349moo_single_free(moo_single *self)
350{
351 cpl_ensure_code(self != NULL, CPL_ERROR_NULL_INPUT);
352
353 if (self->filename != NULL && self->extname != NULL) {
354 if (self->header != NULL) {
355 cpl_propertylist_delete(self->header);
356 self->header = NULL;
357 }
358 if (self->image != NULL) {
359 hdrl_image_delete(self->image);
360 self->image = NULL;
361 }
362 if (self->qual != NULL) {
363 cpl_image_delete(self->qual);
364 self->qual = NULL;
365 }
366 }
367 return CPL_ERROR_NONE;
368}
369
370/*----------------------------------------------------------------------------*/
382/*----------------------------------------------------------------------------*/
383void
384moo_single_save(moo_single *self,
385 const char *filename,
387 int ntas)
388{
389 const char *extname = moo_detector_get_extname(type, ntas);
390
391 if (self != NULL) {
392 if (self->image != NULL) {
393 if (self->header == NULL) {
394 self->header = cpl_propertylist_new();
395 cpl_propertylist_append_string(self->header, MOO_PFITS_EXTNAME,
396 extname);
397 cpl_propertylist_append_double(self->header, MOO_PFITS_EXPTIME,
398 self->exptime);
399 }
400 else if (cpl_propertylist_has(self->header, MOO_PFITS_EXTNAME) ==
401 0) {
402 cpl_propertylist_append_string(self->header, MOO_PFITS_EXTNAME,
403 extname);
404 }
405 cpl_image_save(hdrl_image_get_image(self->image), filename,
406 CPL_TYPE_FLOAT, self->header, CPL_IO_EXTEND);
407
408 cpl_propertylist *err_header = cpl_propertylist_new();
409
410 moo_pfits_append_hduclass_error(err_header, type, ntas,
411 self->header);
412 moo_fits_write_extension_image(hdrl_image_get_error(self->image),
413 filename, MOO_ERR, extname,
414 CPL_TYPE_FLOAT, err_header);
415 cpl_propertylist_delete(err_header);
416 }
417 else {
418 cpl_propertylist *h = cpl_propertylist_new();
419 cpl_propertylist_append_string(h, MOO_PFITS_EXTNAME, extname);
420 cpl_propertylist_save(h, filename, CPL_IO_EXTEND);
421 cpl_propertylist_delete(h);
422 moo_fits_write_extension_image(NULL, filename, MOO_ERR, extname,
423 CPL_TYPE_FLOAT, NULL);
424 }
425 cpl_propertylist *qual_header = cpl_propertylist_new();
426 moo_pfits_append_hduclass_quality(qual_header, type, ntas, self->header,
427 self->badpix_mask);
428 moo_fits_write_extension_image(self->qual, filename, MOO_QUAL, extname,
429 CPL_TYPE_INT, qual_header);
430 cpl_propertylist_delete(qual_header);
431 }
432 else {
433 cpl_propertylist *h = cpl_propertylist_new();
434 cpl_propertylist_append_string(h, MOO_PFITS_EXTNAME, extname);
435 cpl_propertylist_save(h, filename, CPL_IO_EXTEND);
436 cpl_propertylist_delete(h);
437
438 moo_fits_write_extension_image(NULL, filename, MOO_ERR, extname,
439 CPL_TYPE_FLOAT, NULL);
440
441 moo_fits_write_extension_image(NULL, filename, MOO_QUAL, extname,
442 CPL_TYPE_INT, NULL);
443 }
444}
445
446/*----------------------------------------------------------------------------*/
458/*----------------------------------------------------------------------------*/
459cpl_error_code
460moo_single_dump(const moo_single *self, FILE *stream)
461{
462 cpl_ensure_code(stream != NULL, CPL_ERROR_NULL_INPUT);
463
464 if (self != NULL) {
465 fprintf(stream, "---MOO_SINGLE\n");
466 fprintf(stream, "extname %s\n", self->extname);
467 fprintf(stream, "filename %s\n", self->filename);
468 fprintf(stream, "image: ");
469 if (self->image != NULL) {
470 cpl_image_dump_structure(hdrl_image_get_image(self->image), stream);
471 }
472 else {
473 fprintf(stream, "null\n");
474 }
475 fprintf(stream, "header %p\n", (void *)self->header);
476 fprintf(stream, "qual: ");
477 if (self->qual != NULL) {
478 cpl_image_dump_structure(self->qual, stream);
479 }
480 else {
481 fprintf(stream, "null\n");
482 }
483 fprintf(stream, "mask %p\n", (void *)self->mask);
484 }
485
486 return CPL_ERROR_NONE;
487}
488
489/*----------------------------------------------------------------------------*/
500/*----------------------------------------------------------------------------*/
501cpl_error_code
502moo_single_sub(moo_single *a, moo_single *b)
503{
504 cpl_ensure_code(a != NULL, CPL_ERROR_NULL_INPUT);
505 cpl_ensure_code(b != NULL, CPL_ERROR_NULL_INPUT);
506
507 hdrl_image *a_img = moo_single_get_image(a);
508 hdrl_image *b_img = moo_single_get_image(b);
509
510 hdrl_image_sub_image(a_img, b_img);
511
512 cpl_image *qual1 = moo_single_get_qual(a);
513 cpl_image *qual2 = moo_single_get_qual(b);
514 cpl_image_or(a->qual, qual1, qual2);
515
516 return CPL_ERROR_NONE;
517}
518
519/*----------------------------------------------------------------------------*/
530/*----------------------------------------------------------------------------*/
531cpl_error_code
532moo_single_divide(moo_single *a, moo_single *b)
533{
534 cpl_ensure_code(a != NULL, CPL_ERROR_NULL_INPUT);
535 cpl_ensure_code(b != NULL, CPL_ERROR_NULL_INPUT);
536
537 hdrl_image *a_img = moo_single_get_image(a);
538 hdrl_image *b_img = moo_single_get_image(b);
539
540 hdrl_image_div_image(a_img, b_img);
541
542 cpl_image *qual1 = moo_single_get_qual(a);
543 cpl_image *qual2 = moo_single_get_qual(b);
544 cpl_image_or(a->qual, qual1, qual2);
545
546 return CPL_ERROR_NONE;
547}
548
549/*----------------------------------------------------------------------------*/
560/*----------------------------------------------------------------------------*/
561cpl_error_code
562moo_single_multiply_scalar(moo_single *a, double scalar)
563{
564 cpl_ensure_code(a != NULL, CPL_ERROR_NULL_INPUT);
565 hdrl_image *a_img = moo_single_get_image(a);
566
567 hdrl_value v;
568 v.data = scalar;
569 v.error = 0;
570 hdrl_image_mul_scalar(a_img, v);
571
572 return CPL_ERROR_NONE;
573}
574
575/*----------------------------------------------------------------------------*/
586/*----------------------------------------------------------------------------*/
587cpl_error_code
588moo_single_sum(moo_single *a, moo_single *b)
589{
590 cpl_ensure_code(a != NULL, CPL_ERROR_NULL_INPUT);
591 cpl_ensure_code(b != NULL, CPL_ERROR_NULL_INPUT);
592
593 hdrl_image *a_img = moo_single_get_image(a);
594 hdrl_image *b_img = moo_single_get_image(b);
595
596 hdrl_image_add_image(a_img, b_img);
597
598 cpl_image *qual1 = moo_single_get_qual(a);
599 cpl_image *qual2 = moo_single_get_qual(b);
600
601 cpl_image_or(a->qual, qual1, qual2);
602
603 return CPL_ERROR_NONE;
604}
605/*----------------------------------------------------------------------------*/
616/*----------------------------------------------------------------------------*/
617cpl_error_code
618moo_single_mean(moo_single *a, moo_single *b)
619{
620 cpl_ensure_code(a != NULL, CPL_ERROR_NULL_INPUT);
621 cpl_ensure_code(b != NULL, CPL_ERROR_NULL_INPUT);
622
623 hdrl_image *a_img = moo_single_get_image(a);
624 hdrl_image *b_img = moo_single_get_image(b);
625
626 hdrl_image_add_image(a_img, b_img);
627 cpl_image *img = hdrl_image_get_image(a_img);
628 cpl_image *err = hdrl_image_get_error(a_img);
629 cpl_image_divide_scalar(img, 2.);
630 cpl_image_divide_scalar(err, 2.);
631 cpl_image *qual1 = moo_single_get_qual(a);
632 cpl_image *qual2 = moo_single_get_qual(b);
633
634 cpl_image_or(a->qual, qual1, qual2);
635
636 return CPL_ERROR_NONE;
637}
638
639/*----------------------------------------------------------------------------*/
650/*----------------------------------------------------------------------------*/
651cpl_error_code
652moo_single_filter_snr(moo_single *self, double min_snr)
653{
654 cpl_ensure_code(self != NULL, CPL_ERROR_NULL_INPUT);
655 hdrl_image *img = moo_single_get_image(self);
656
657 cpl_mask *img_mask = hdrl_image_get_mask(img);
658
659 cpl_image *im = hdrl_image_get_image(img);
660 cpl_image *err = hdrl_image_get_error(img);
661 cpl_image *snr = cpl_image_divide_create(im, err);
662
663 int nx = cpl_image_get_size_x(snr);
664 int ny = cpl_image_get_size_y(snr);
665 cpl_mask *mask = cpl_mask_new(nx, ny);
666
667 for (int j = 1; j <= ny; j++) {
668 for (int i = 1; i <= nx; i++) {
669 int rej;
670 double val = cpl_image_get(snr, i, j, &rej);
671 if (fabs(val) >= DBL_EPSILON && val < min_snr) {
672 cpl_mask_set(img_mask, i, j, CPL_BINARY_1);
673 cpl_mask_set(mask, i, j, CPL_BINARY_1);
674 }
675 }
676 }
677 cpl_image *qual = moo_single_get_qual(self);
679 cpl_mask_delete(mask);
680 cpl_image_delete(snr);
681 return CPL_ERROR_NONE;
682}
683
684
685moo_single *
686moo_single_add_create(moo_single *a, moo_single *b)
687{
688 cpl_ensure(a != NULL, CPL_ERROR_NULL_INPUT, NULL);
689 cpl_ensure(b != NULL, CPL_ERROR_NULL_INPUT, NULL);
690 moo_single *result = moo_single_new(a->type, a->ntas);
691
692 cpl_propertylist_copy_property(result->header, a->header, MOO_PFITS_CRPIX1);
693 cpl_propertylist_copy_property(result->header, a->header, MOO_PFITS_CRPIX2);
694 cpl_propertylist_copy_property(result->header, a->header, MOO_PFITS_CRVAL1);
695 cpl_propertylist_copy_property(result->header, a->header, MOO_PFITS_CRVAL2);
696 cpl_propertylist_copy_property(result->header, a->header, MOO_PFITS_CD1_1);
697 cpl_propertylist_copy_property(result->header, a->header, MOO_PFITS_CD1_2);
698 cpl_propertylist_copy_property(result->header, a->header, MOO_PFITS_CD2_1);
699 cpl_propertylist_copy_property(result->header, a->header, MOO_PFITS_CD2_2);
700 cpl_propertylist_copy_property(result->header, a->header, MOO_PFITS_CTYPE1);
701 cpl_propertylist_copy_property(result->header, a->header, MOO_PFITS_CUNIT1);
702 cpl_propertylist_copy_property(result->header, a->header, MOO_PFITS_CTYPE2);
703 cpl_propertylist_copy_property(result->header, a->header, MOO_PFITS_BUNIT);
704
705 result->image = hdrl_image_duplicate(moo_single_get_image(a));
706 result->qual = cpl_image_duplicate(moo_single_get_qual(a));
707
708 moo_single_sum(result, b);
709
710 return result;
711}
712
713double
714moo_single_get_exptime(moo_single *self)
715{
716 cpl_ensure(self != NULL, CPL_ERROR_NULL_INPUT, 0);
717
718 return moo_pfits_get_exptime(self->header);
719}
720
721cpl_propertylist *
722moo_single_get_header(moo_single *self)
723{
724 cpl_ensure(self != NULL, CPL_ERROR_NULL_INPUT, NULL);
725 if (self->header == NULL) {
726 if (self->extname != NULL && self->filename != NULL) {
727 self->header = moo_fits_load_extension_header(self->filename, "",
728 self->extname);
729 }
730 if (self->header == NULL) {
731 self->header = cpl_propertylist_new();
732 }
733 }
734 return self->header;
735}
736
737cpl_error_code
738moo_single_set_exptime(moo_single *self, double val)
739{
740 cpl_ensure_code(self != NULL, CPL_ERROR_NULL_INPUT);
741 cpl_ensure_code(self->header != NULL, CPL_ERROR_NULL_INPUT);
742
743 return moo_pfits_update_exptime(self->header, val);
744}
cpl_error_code moo_mask_to_badpix(cpl_image *badpix, cpl_mask *mask, unsigned int level)
Add the mask of the badpix level to the badpix map.
Definition: moo_badpix.c:105
#define MOO_BADPIX_LOW_QE
Definition: moo_badpix.h:45
cpl_error_code moo_badpix_to_mask(cpl_image *badpix, cpl_mask *mask, unsigned int level)
Apply the badpix map on the given mask.
Definition: moo_badpix.c:58
#define MOO_BADPIX_GOOD
Definition: moo_badpix.h:36
const char * moo_detector_get_extname(moo_detector_type type, int ntas)
Get the extension name of a detector.
Definition: moo_detector.c:137
enum _moo_detector_type_ moo_detector_type
The type code type.
Definition: moo_detector.h:64
const char * moo_detector_get_qual_extname(moo_detector_type type, int ntas)
Get the QUAL extension name of a detector.
Definition: moo_detector.c:101
cpl_error_code moo_fits_write_extension_image(cpl_image *image, const char *filename, const char *name, const char *detectorname, cpl_type type, cpl_propertylist *header)
Write an image as extension in FITS file.
Definition: moo_fits.c:123
cpl_image * moo_fits_load_extension_image(const char *filename, const char *name, const char *detectorname, cpl_type type)
Load an image from FITS file.
Definition: moo_fits.c:311
hdrl_image * moo_single_get_image(moo_single *self)
Get the IMAGE part (DATA,ERR) of single DET.
Definition: moo_single.c:330
cpl_error_code moo_single_load(moo_single *self, unsigned int level)
Load data in a single structure.
Definition: moo_single.c:152
cpl_error_code moo_single_mean(moo_single *a, moo_single *b)
Mean of two single DET.
Definition: moo_single.c:618
cpl_image * moo_single_get_data(moo_single *self)
Get the DATA part of single DET.
Definition: moo_single.c:239
cpl_error_code moo_single_sub(moo_single *a, moo_single *b)
Subtract two single DET.
Definition: moo_single.c:502
cpl_error_code moo_single_apply_mask(moo_single *self, cpl_mask *mask, unsigned int level)
Apply the given mask on the QUAL part.
Definition: moo_single.c:287
cpl_image * moo_single_get_err(moo_single *self)
Get the ERROR part of single DET.
Definition: moo_single.c:262
void moo_single_delete(moo_single *self)
Delete a moo_single.
Definition: moo_single.c:211
moo_single * moo_single_create(const char *filename, moo_detector_type type, int ntas)
Create a new moo_single from the given filename.
Definition: moo_single.c:105
cpl_error_code moo_single_dump(const moo_single *self, FILE *stream)
Dump structural information of a Single DET.
Definition: moo_single.c:460
cpl_error_code moo_single_free(moo_single *self)
Free memory associate to this single DET.
Definition: moo_single.c:349
cpl_error_code moo_single_sum(moo_single *a, moo_single *b)
Add two single DET.
Definition: moo_single.c:588
moo_single * moo_single_new(moo_detector_type type, int ntas)
Create a new moo_single.
Definition: moo_single.c:73
cpl_image * moo_single_get_qual(moo_single *self)
Get the QUAL part of single DET.
Definition: moo_single.c:312
cpl_error_code moo_single_divide(moo_single *a, moo_single *b)
Divide two single DET.
Definition: moo_single.c:532
cpl_error_code moo_single_multiply_scalar(moo_single *a, double scalar)
Elementwise multiplication of a single with a scalar.
Definition: moo_single.c:562
void moo_single_save(moo_single *self, const char *filename, moo_detector_type type, int ntas)
Save a moo_single to a FITS file.
Definition: moo_single.c:384
cpl_error_code moo_single_filter_snr(moo_single *self, double min_snr)
Flag low snr pixels from single DET structure.
Definition: moo_single.c:652
cpl_error_code moo_pfits_append_hduclass_quality(cpl_propertylist *plist, moo_detector_type type, int ntas, const cpl_propertylist *sci_header, int mask)
Set the HDUCLASS QUALITY Keyword.
Definition: moo_pfits.c:1591
cpl_error_code moo_pfits_update_exptime(cpl_propertylist *plist, double value)
Set the EXPTIME value.
Definition: moo_pfits.c:1060
cpl_error_code moo_pfits_append_hduclass_error(cpl_propertylist *plist, moo_detector_type type, int ntas, const cpl_propertylist *sci_header)
Set the HDUCLASS ERROR Keyword.
Definition: moo_pfits.c:1537
double moo_pfits_get_exptime(const cpl_propertylist *plist)
find out the EXPTIME value
Definition: moo_pfits.c:1039
int moo_pfits_get_naxis(const cpl_propertylist *plist)
find out the NAXIS value
Definition: moo_pfits.c:980