[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master 175354f 095/113: All MakeCatalog spectrums set
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master 175354f 095/113: All MakeCatalog spectrums set to NaN when no measurement was done |
Date: |
Fri, 16 Apr 2021 10:33:58 -0400 (EDT) |
branch: master
commit 175354f113709564b8d91a3983f79b14433ff4e2
Author: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>
All MakeCatalog spectrums set to NaN when no measurement was done
Because zero is meaningful, recently, in the projected measurements, we set
the slices were there was no measurement to NaN. But the same argument also
applies to the `SUM', `SUM_ERR', `SUM_OTHER', and `SUM_OTHER_ERROR'
columns. So in this commit, when there are no labeled voxels in a slice, it
is set to NaN in all its spectra.
---
bin/mkcatalog/parse.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/bin/mkcatalog/parse.c b/bin/mkcatalog/parse.c
index d9adaff..6a7ad46 100644
--- a/bin/mkcatalog/parse.c
+++ b/bin/mkcatalog/parse.c
@@ -404,7 +404,11 @@ parse_spectrum(struct mkcatalog_passparams *pp, gal_data_t
*xybin)
index `pind' if we have just finished parsing a slice. */
if( (num_increment-1)%pp->tile->dsize[1]==0 )
{
- if(nproj==0) parr[sind]=pearr[sind]=NAN;
+ /* If there was no measurement, set NaN for the values and their
+ errors (zero is meaningful). */
+ if( nproj ==0 ) parr[sind] = pearr[sind] = NAN;
+ if( narr[sind] ==0 ) sarr[sind] = searr[sind] = NAN;
+ if( oarr[sind] ==0 ) osarr[sind] = osearr[sind] = NAN;
nproj=pind=0;
++sind;
- [gnuastro-commits] master 63b4edd 070/113: Imported work in master, conflicts fixed, (continued)
- [gnuastro-commits] master 63b4edd 070/113: Imported work in master, conflicts fixed, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 0ced9e5 072/113: Imported recent work in master, no conflicts, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 88935ae 073/113: Dataset pointers initialized to NULL in upperlimit_write_check, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master d02c999 079/113: Recent work in master imported, conflicts fixed, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 4021652 078/113: Imported recent work in master, conflicts fixed, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 8d64628 081/113: Recent work in master imported, minor conflicts fixed, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 800c769 082/113: Imported all the work in master, conflicts fixed, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master ac91655 084/113: Imported recent work in master, no conflicts, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master d57e0e6 087/113: New spectrum measurement from 3D inputs in MakeCatalog, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master a8428fe 088/113: Imported recent work in master, conflicts fixed, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 175354f 095/113: All MakeCatalog spectrums set to NaN when no measurement was done,
Mohammad Akhlaghi <=
- [gnuastro-commits] master fe0e594 097/113: Imported recent work in master, no conflicts, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 5d5fd95 106/113: NoiseChisel: independent test of input's dimensions, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master ee4bf1e 069/113: Imported recent work from master, Segment's 3D kernels added, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 2c6c7e0 076/113: Imported recent work, no conflicts, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master e2aba57 083/113: Recent work in master imported, conflicts fixed, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master e92fd9c 039/113: Merged recent work in master, conflicts fixed, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 54b099d 043/113: Neighbors options doc generalized for different dimensions, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 5cd3c1e 044/113: Recent work in master merged, small conflicts fixed, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 1b0046b 051/113: Recent additions in master imported here, no conflicts, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master b1ea932 054/113: Separate Segment program now available in 3D, Mohammad Akhlaghi, 2021/04/16