Skip to content

Commit

Permalink
smurf: Check for bad variances when combining map chunks
Browse files Browse the repository at this point in the history
  • Loading branch information
David Berry committed May 15, 2014
1 parent 27a9da8 commit e3fdd58
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions applications/smurf/libsmf/smf_rebinmap1.c
Expand Up @@ -135,6 +135,9 @@
* accumulate into its own map.
* 2014-2-13 (DSB):
* Allow NULL to be supplied for mapvar.
* 2014-5-15 (DSB):
* Check for bad and negative bolometer variance values, as well as
* zero values.
* {enter_further_changes_here}
* Notes:
Expand Down Expand Up @@ -629,7 +632,8 @@ static void smf1_rebinmap1( void *job_data_ptr, int *status ) {

/* Check that the data and variance values are valid */
if( !( pdata->qual[ di ] & pdata->mask ) &&
( pdata->var[ vi ] != 0.0 ) &&
( pdata->var[ vi ] > 0.0 ) &&
( pdata->var[ vi ] != VAL__BADD ) &&
( ipix != SMF__BADDIMT ) ) {

/* index into (temporary) sub map */
Expand Down Expand Up @@ -683,7 +687,7 @@ static void smf1_rebinmap1( void *job_data_ptr, int *status ) {

if( pdata->dat[ di ] != VAL__BADD &&
pdata->var[ vi ] != VAL__BADD &&
pdata->var[ vi ] != 0.0 && ipix != SMF__BADDIMT ) {
pdata->var[ vi ] > 0.0 && ipix != SMF__BADDIMT ) {

tipix = tmap0 + ipix;

Expand Down Expand Up @@ -726,7 +730,8 @@ static void smf1_rebinmap1( void *job_data_ptr, int *status ) {
}

if( !( pdata->qual[ di ] & pdata->mask ) &&
( pdata->var[ vi ] != 0.0 ) &&
( pdata->var[ vi ] > 0.0 ) &&
( pdata->var[ vi ] != VAL__BADD ) &&
( ipix != SMF__BADDIMT ) ) {

tipix = tmap0 + ipix;
Expand Down Expand Up @@ -765,7 +770,7 @@ static void smf1_rebinmap1( void *job_data_ptr, int *status ) {

if( pdata->dat[ di ] != VAL__BADD &&
pdata->var[ vi ] != VAL__BADD &&
pdata->var[ vi ] != 0.0 && ipix != SMF__BADDIMT ) {
pdata->var[ vi ] > 0.0 && ipix != SMF__BADDIMT ) {

tipix = tmap0 + ipix;

Expand Down

0 comments on commit e3fdd58

Please sign in to comment.