[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master fbbc2fc 100/113: Imported recent work in maste
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master fbbc2fc 100/113: Imported recent work in master, minor conflict fixed |
Date: |
Fri, 16 Apr 2021 10:33:59 -0400 (EDT) |
branch: master
commit fbbc2fc111308daa1c68954eaca7ed067a2b4d43
Merge: 313d522 d002ec8
Author: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Imported recent work in master, minor conflict fixed
The new `var' variable replaces `st' measuring the standard deviation. So I
just replaced `st' with `var' in `HEAD' and removed everything in `master'.
---
NEWS | 7 +++++++
bin/mkcatalog/args.h | 4 ++--
bin/mkcatalog/columns.c | 11 ++++++-----
bin/mkcatalog/main.h | 4 ++--
bin/mkcatalog/parse.c | 16 ++++++++--------
bin/mkcatalog/ui.c | 4 ++--
doc/gnuastro.en.html | 10 +++++++++-
doc/gnuastro.fr.html | 5 +++++
doc/gnuastro.texi | 6 +++---
9 files changed, 44 insertions(+), 23 deletions(-)
diff --git a/NEWS b/NEWS
index b110e67..3290258 100644
--- a/NEWS
+++ b/NEWS
@@ -63,6 +63,13 @@ GNU Astronomy Utilities NEWS -*-
outline -*-
color maps in Gnuastro 0.8, it is also necessary to force a range on
non-byte datasets. It is thus necessary to use a more generic name.
+ MakeCatalog:
+ --std: Until now, this option would measure the mean standard deviation
+ under the label. But this is not a statistically meaningful measure
+ for the Sky standard deviation and could be incorrectly used. From now
+ on, this option measures the square root of the mean variance, or root
+ mean square (the correct definition of the Sky standard deviation).
+
** Bugs fixed
bug #55313: Fits program writing --write values in reverse order
bug #55333: Fits program crash when --write or --update have no value.
diff --git a/bin/mkcatalog/args.h b/bin/mkcatalog/args.h
index 87b1e7a..b08a2ac 100644
--- a/bin/mkcatalog/args.h
+++ b/bin/mkcatalog/args.h
@@ -1166,7 +1166,7 @@ struct argp_option program_options[] =
UI_KEY_SKY,
0,
0,
- "Average Sky value under this clump or object.",
+ "Sky value (per pixel).",
UI_GROUP_COLUMNS_BRIGHTNESS,
0,
GAL_TYPE_INVALID,
@@ -1180,7 +1180,7 @@ struct argp_option program_options[] =
UI_KEY_STD,
0,
0,
- "Average Sky standard deviation under label.",
+ "Sky standard deviation (per pixel).",
UI_GROUP_COLUMNS_BRIGHTNESS,
0,
GAL_TYPE_INVALID,
diff --git a/bin/mkcatalog/columns.c b/bin/mkcatalog/columns.c
index 613c895..b631a33 100644
--- a/bin/mkcatalog/columns.c
+++ b/bin/mkcatalog/columns.c
@@ -1279,7 +1279,7 @@ columns_define_alloc(struct mkcatalogparams *p)
case UI_KEY_STD:
name = "STD";
unit = MKCATALOG_NO_UNIT;
- ocomment = "Average of input standard deviation.";
+ ocomment = "Sky standard deviation under object.";
ccomment = ocomment;
otype = GAL_TYPE_FLOAT32;
ctype = GAL_TYPE_FLOAT32;
@@ -1287,7 +1287,7 @@ columns_define_alloc(struct mkcatalogparams *p)
disp_width = 10;
disp_precision = 4;
oiflag[ OCOL_NUM ] = ciflag[ CCOL_NUM ] = 1;
- oiflag[ OCOL_SUMSTD ] = ciflag[ CCOL_SUMSTD ] = 1;
+ oiflag[ OCOL_SUMVAR ] = ciflag[ CCOL_SUMVAR ] = 1;
break;
case UI_KEY_SEMIMAJOR:
@@ -2059,7 +2059,8 @@ columns_fill(struct mkcatalog_passparams *pp)
break;
case UI_KEY_STD:
- ((float *)colarr)[oind] = MKC_RATIO(oi[OCOL_SUMSTD], oi[OCOL_NUM]);
+ ((float *)colarr)[oind] = sqrt( MKC_RATIO( oi[ OCOL_SUMVAR ],
+ oi[ OCOL_NUM ]) );
break;
case UI_KEY_SEMIMAJOR:
@@ -2307,8 +2308,8 @@ columns_fill(struct mkcatalog_passparams *pp)
break;
case UI_KEY_STD:
- ((float *)colarr)[cind] = MKC_RATIO( ci[ CCOL_SUMSTD ],
- ci[ CCOL_NUM ] );
+ ((float *)colarr)[cind] = sqrt( MKC_RATIO( ci[ CCOL_SUMVAR ],
+ ci[ CCOL_NUM ] ));
break;
case UI_KEY_SEMIMAJOR:
diff --git a/bin/mkcatalog/main.h b/bin/mkcatalog/main.h
index 2b3ca22..4296f72 100644
--- a/bin/mkcatalog/main.h
+++ b/bin/mkcatalog/main.h
@@ -84,7 +84,7 @@ enum objectcols
OCOL_VYY, /* Sum of (value-sky) * y * y. */
OCOL_VXY, /* Sum of (value-sky) * x * y. */
OCOL_SUMSKY, /* Sum of sky value on this object. */
- OCOL_SUMSTD, /* Sum of sky STD value on this object. */
+ OCOL_SUMVAR, /* Sum of sky variance value on this object. */
OCOL_SUMWHT, /* Sum of positive image pixels. */
OCOL_NUMWHT, /* Number of positive pixels used for wht. */
OCOL_GX, /* Geometric center of object in X. */
@@ -131,7 +131,7 @@ enum clumpcols
CCOL_VYY, /* Sum of flux*y*y of this clump. */
CCOL_VXY, /* Sum of flux*x*y of this clump. */
CCOL_SUMSKY, /* Sum of sky value on this object. */
- CCOL_SUMSTD, /* Sum of sky STD value on this object. */
+ CCOL_SUMVAR, /* Sum of sky variance value on this object. */
CCOL_SUMWHT, /* Sum of positive image pixels for wht. */
CCOL_NUMWHT, /* Num of positive image pixels for wht. */
CCOL_GX, /* Geometric center of clump in X. */
diff --git a/bin/mkcatalog/parse.c b/bin/mkcatalog/parse.c
index ba50f68..4f49069 100644
--- a/bin/mkcatalog/parse.c
+++ b/bin/mkcatalog/parse.c
@@ -440,7 +440,7 @@ parse_objects(struct mkcatalog_passparams *pp)
gal_data_t *xybin=NULL;
size_t *tsize=pp->tile->dsize;
uint8_t *xybinarr=NULL, *u, *uf;
- float st, sval, *V=NULL, *SK=NULL, *ST=NULL;
+ float var, sval, *V=NULL, *SK=NULL, *ST=NULL;
size_t d, pind=0, increment=0, num_increment=1;
int32_t *O, *OO, *C=NULL, *objarr=p->objects->array;
float *std=p->std?p->std->array:NULL, *sky=p->sky?p->sky->array:NULL;
@@ -618,8 +618,8 @@ parse_objects(struct mkcatalog_passparams *pp)
if(p->std)
{
sval = pp->st_std ? *ST : (p->std->size>1?std[tid]:std[0]);
- st = p->variance ? sqrt(sval) : sval;
- if(oif[ OCOL_SUMSTD ]) oi[ OCOL_SUMSTD ] += st;
+ var = p->variance ? sval : sval*sval;
+ if(oif[ OCOL_SUMVAR ]) oi[ OCOL_SUMVAR ] += var;
/* For each pixel, we have a sky contribution to the
counts and the signal's contribution. The standard
deviation in the sky is simply `sval', but the
@@ -631,7 +631,7 @@ parse_objects(struct mkcatalog_passparams *pp)
noisy there will be negative values, and we don't want
them to decrease the variance. */
if(oif[ OCOL_SUM_VAR ])
- oi[ OCOL_SUM_VAR ] += ( (p->variance ? sval : st*st)
+ oi[ OCOL_SUM_VAR ] += ( (p->variance ? var : sval)
+ fabs(*V) );
}
}
@@ -716,7 +716,7 @@ parse_clumps(struct mkcatalog_passparams *pp)
size_t *tsize=pp->tile->dsize;
int32_t *O, *OO, *C=NULL, nlab;
uint8_t *u, *uf, *cif=p->ciflag;
- float st, sval, *V=NULL, *SK=NULL, *ST=NULL;
+ float var, sval, *V=NULL, *SK=NULL, *ST=NULL;
size_t nngb=gal_dimension_num_neighbors(ndim);
size_t i, ii, d, pind=0, increment=0, num_increment=1;
int32_t *objects=p->objects->array, *clumps=p->clumps->array;
@@ -893,10 +893,10 @@ parse_clumps(struct mkcatalog_passparams *pp)
sval = ( pp->st_std
? *ST
: (p->std->size>1 ? std[tid] : std[0]) );
- st = p->variance ? sqrt(sval) : sval;
- if(cif[ CCOL_SUMSTD ]) ci[ CCOL_SUMSTD ] += st;
+ var = p->variance ? sval : sval*sval;
+ if(cif[ CCOL_SUMVAR ]) ci[ CCOL_SUMVAR ] += var;
if(cif[ CCOL_SUM_VAR ])
- ci[ CCOL_SUM_VAR ] += ( (p->variance ? sval : st*st)
+ ci[ CCOL_SUM_VAR ] += ( (p->variance ? var : sval)
+ fabs(*V) );
}
}
diff --git a/bin/mkcatalog/ui.c b/bin/mkcatalog/ui.c
index 0940735..3f81fb5 100644
--- a/bin/mkcatalog/ui.c
+++ b/bin/mkcatalog/ui.c
@@ -719,7 +719,7 @@ ui_necessary_inputs(struct mkcatalogparams *p, int *values,
int *sky,
case OCOL_VYY: *values = 1; break;
case OCOL_VXY: *values = 1; break;
case OCOL_SUMSKY: *sky = 1; break;
- case OCOL_SUMSTD: *std = 1; break;
+ case OCOL_SUMVAR: *std = 1; break;
case OCOL_SUMWHT: *values = 1; break;
case OCOL_NUMWHT: *values = 1; break;
case OCOL_GX: /* Only object labels. */ break;
@@ -773,7 +773,7 @@ ui_necessary_inputs(struct mkcatalogparams *p, int *values,
int *sky,
case CCOL_VYY: *values = 1; break;
case CCOL_VXY: *values = 1; break;
case CCOL_SUMSKY: *sky = 1; break;
- case CCOL_SUMSTD: *std = 1; break;
+ case CCOL_SUMVAR: *std = 1; break;
case CCOL_SUMWHT: *values = 1; break;
case CCOL_NUMWHT: *values = 1; break;
case CCOL_GX: /* Only clump labels. */ break;
diff --git a/doc/gnuastro.en.html b/doc/gnuastro.en.html
index b8c04d7..a0cd4e2 100644
--- a/doc/gnuastro.en.html
+++ b/doc/gnuastro.en.html
@@ -114,6 +114,14 @@ for entertaining and easy to read real world examples of
using
+
+<a href="https://repology.org/metapackage/gnuastro/versions" target="_blank">
+ <img
src="https://repology.org/badge/vertical-allrepos/gnuastro.svg?header=Gnuastro
packaging status" alt="Packaging status" align="right">
+</a>
+
+
+
+
<h3 id="installation">Installation</h3>
<p>See <a href="manual/html_node/Quick-start.html">Quick start</a> for a fast
@@ -428,7 +436,7 @@ Commons Attribution-NoDerivs 4.0 International
License</a>.</p>
<p class="unprintable">Updated:
<!-- timestamp start -->
-$Date: 2017/09/12 22:25:08 $
+$Date: 2019/01/22 19:14:35 $
<!-- timestamp end -->
</p>
</div>
diff --git a/doc/gnuastro.fr.html b/doc/gnuastro.fr.html
index dd1260c..043a1d5 100644
--- a/doc/gnuastro.fr.html
+++ b/doc/gnuastro.fr.html
@@ -109,6 +109,11 @@ h3 { clear: both; }
possible.</p>
+<a href="https://repology.org/metapackage/gnuastro/versions" target="_blank">
+ <img
src="https://repology.org/badge/vertical-allrepos/gnuastro.svg?header=Gnuastro
packaging status" alt="Packaging status" align="right">
+</a>
+
+
<h3 id="installation">Installation</h3>
<p>Le chapitre <cite><a href="manual/html_node/Quick-start.html">Quick
diff --git a/doc/gnuastro.texi b/doc/gnuastro.texi
index 1b24a08..f88e3b8 100644
--- a/doc/gnuastro.texi
+++ b/doc/gnuastro.texi
@@ -19525,9 +19525,9 @@ actually the mean value of all the pixels in the sky
image that lie on
the same position as the object or clump.
@item --std
-The sky value standard deviation (per pixel) for this clump or
-object. Like @option{--sky}, this is the average of the values in the
-input sky standard deviation image pixels that lie over this object.
+The sky value standard deviation (per pixel) for this clump or object. This
+is the square root of the mean variance under the object, or the root mean
+square.
@item -C
@itemx --numclumps
- [gnuastro-commits] master 133e277 071/113: Imported recent work from master, conflicts fixed, (continued)
- [gnuastro-commits] master 133e277 071/113: Imported recent work from master, conflicts fixed, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master a42ac37 085/113: Fixed MakeProfiles loop in checking radius values, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 1f9d941 090/113: Imported recent work in master, conflicts fixed, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 737a0cd 046/113: Merged recent corrections in master branch, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 486f915 067/113: Imported recent work in master, conflicts fixed, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master d6051a1 074/113: Upperlimit magnitude in 3D, corrected creation of check table, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 5dac3c3 075/113: Recent work in master imported, small conflict in book fixed, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 3882956 077/113: Narrow-band areas from MakeCatalog in 3D datasets, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master abe82cb 086/113: Imported recent work in master, no conflicts, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 924787b 098/113: Updated copyright year in files specific to this branch, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master fbbc2fc 100/113: Imported recent work in master, minor conflict fixed,
Mohammad Akhlaghi <=
- [gnuastro-commits] master 22d0fba 089/113: Imported recent work in master, no conflicts, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 8edc804 092/113: Imported recent work in master, minor conflic fixed, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master b5385f7 093/113: Projected spectra given NaN when no measurement on slice, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master ac2a821 103/113: Imported recent work in master, conflicts fixed, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 3f51e31 108/113: Imported work in master, conflicts fixed, corrections made, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 45bd003 049/113: Imported recent work in master, conflicts fixed, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 6f85919 060/113: Connectivity of 2, for filling pseudo-detection holes in 3D, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 442d052 061/113: Imported work in master, no conflicts, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 9285abe 057/113: Imported recent work from master with corrections, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master c91d988 063/113: Recent work in master merged, conflicts corrected, Mohammad Akhlaghi, 2021/04/16