diff --git a/src/Projection.cxx b/src/Projection.cxx index f83b771..47d7e90 100644 --- a/src/Projection.cxx +++ b/src/Projection.cxx @@ -1387,9 +1387,11 @@ void to_map_single_thread(Pointer &pointer, int n_det = pointer.DetCount(); for (int i_det = 0; i_det < n_det; ++i_det) { FSIGNAL det_wt = 1.; - if (_det_weights->obj != NULL) + if (_det_weights->obj != NULL){ det_wt = *(FSIGNAL*)((char*)_det_weights->buf + _det_weights->strides[0]*i_det); + if (det_wt == 0.) continue; + } double dofs[4]; double coords[4]; FSIGNAL pf[S::comp_count]; @@ -1423,9 +1425,11 @@ void to_weight_map_single_thread(Pointer &pointer, int n_det = pointer.DetCount(); for (int i_det = 0; i_det < n_det; ++i_det) { FSIGNAL det_wt = 1.; - if (_det_weights->obj != NULL) + if (_det_weights->obj != NULL){ det_wt = *(FSIGNAL*)((char*)_det_weights->buf + _det_weights->strides[0]*i_det); + if (det_wt == 0.) continue; + } double dofs[4]; double coords[4]; FSIGNAL pf[S::comp_count]; @@ -1694,9 +1698,10 @@ void precomp_to_map_single_thread(Pixelizor2_Flat &tiling, for (int i_det = 0; i_det < n_det; ++i_det) { FSIGNAL det_wt = 1.; - if (_det_weights->obj != NULL) + if (_det_weights->obj != NULL){ det_wt = *(FSIGNAL*)((char*)_det_weights->buf + _det_weights->strides[0]*i_det); - + if (det_wt == 0.) continue; + } for (auto const &rng: ivals[i_det].segments) { for (int i_time = rng.first; i_time < rng.second; ++i_time) { const int *pixel_offset = pixel_buf_man.data_ptr[i_det] + @@ -1728,9 +1733,10 @@ void precomp_to_weight_map_single_thread(Pixelizor2_Flat &tiling, assert(spin_proj_man.steps[1] == 1); // assumed below for (int i_det = 0; i_det < n_det; ++i_det) { FSIGNAL det_wt = 1.; - if (_det_weights->obj != NULL) + if (_det_weights->obj != NULL){ det_wt = *(FSIGNAL*)((char*)_det_weights->buf + _det_weights->strides[0]*i_det); - + if (det_wt == 0.) continue; + } for (auto const &rng: ivals[i_det].segments) { for (int i_time = rng.first; i_time < rng.second; ++i_time) { const int *pixel_offset = pixel_buf_man.data_ptr[i_det] +