[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master c91d988 063/113: Recent work in master merged,
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master c91d988 063/113: Recent work in master merged, conflicts corrected |
Date: |
Fri, 16 Apr 2021 10:33:47 -0400 (EDT) |
branch: master
commit c91d9883ae9237b477b8e4e78f209a8c3747ade6
Merge: 1af4ea9 bdcc13d
Author: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Recent work in master merged, conflicts corrected
Some conflicts came up during the merge and have been fixed.
---
bin/segment/astsegment-3d.conf | 2 +-
bin/segment/astsegment.conf | 2 +-
bin/segment/clumps.c | 44 +++++++++++++++++++++++-------------------
3 files changed, 26 insertions(+), 22 deletions(-)
diff --git a/bin/segment/astsegment-3d.conf b/bin/segment/astsegment-3d.conf
index 2dcaed3..4c94999 100644
--- a/bin/segment/astsegment-3d.conf
+++ b/bin/segment/astsegment-3d.conf
@@ -23,7 +23,7 @@
dhdu DETECTIONS
skyhdu SKY
stdhdu SKY_STD
- minskyfrac 0.7
+ minskyfrac 0.6
minnumfalse 100
# Tessellation
diff --git a/bin/segment/astsegment.conf b/bin/segment/astsegment.conf
index e5a3b7f..dbbc038 100644
--- a/bin/segment/astsegment.conf
+++ b/bin/segment/astsegment.conf
@@ -23,7 +23,7 @@
dhdu DETECTIONS
skyhdu SKY
stdhdu SKY_STD
- minskyfrac 0.7
+ minskyfrac 0.6
minnumfalse 100
# Tessellation
diff --git a/bin/segment/clumps.c b/bin/segment/clumps.c
index 05628d8..5877f88 100644
--- a/bin/segment/clumps.c
+++ b/bin/segment/clumps.c
@@ -250,7 +250,7 @@ clumps_get_raw_info(struct clumps_thread_params *cltprm)
double *row, *info=cltprm->info->array;
size_t nngb=gal_dimension_num_neighbors(ndim);
struct gal_tile_two_layer_params *tl=&p->cp.tl;
- float *arr=p->input->array, *std=p->std->array;
+ float *values=p->input->array, *std=p->std->array;
size_t *dinc=gal_dimension_increment(ndim, dsize);
int32_t lab, nlab, *ngblabs, *clabel=p->clabel->array;
@@ -260,22 +260,22 @@ clumps_get_raw_info(struct clumps_thread_params *cltprm)
/* Go over all the pixels in this region. */
af=(a=cltprm->indexs->array)+cltprm->indexs->size;
do
- if( !isnan(arr[ *a ]) )
+ if( !isnan(values[ *a ]) )
{
/* This pixel belongs to a clump. */
if( clabel[ *a ]>0 )
{
lab=clabel[*a];
++info[ lab * INFO_NCOLS + INFO_INAREA ];
- info[ lab * INFO_NCOLS + INFO_INFLUX ] += arr[*a];
- if( arr[*a]>0.0f )
+ info[ lab * INFO_NCOLS + INFO_INFLUX ] += values[*a];
+ if( values[*a]>0.0f )
{
gal_dimension_index_to_coord(*a, ndim, dsize, coord);
- info[ lab * INFO_NCOLS + INFO_SFF ] += arr[*a];
- info[ lab * INFO_NCOLS + INFO_X ] += arr[*a] * coord[0];
- info[ lab * INFO_NCOLS + INFO_Y ] += arr[*a] * coord[1];
+ info[ lab * INFO_NCOLS + INFO_SFF ] += values[*a];
+ info[ lab * INFO_NCOLS + INFO_X ] += values[*a] * coord[0];
+ info[ lab * INFO_NCOLS + INFO_Y ] += values[*a] * coord[1];
if(ndim==3)
- info[ lab * INFO_NCOLS + INFO_Z ] += arr[*a] * coord[2];
+ info[ lab * INFO_NCOLS + INFO_Z ] += values[*a] * coord[2];
}
}
@@ -312,8 +312,8 @@ clumps_get_raw_info(struct clumps_thread_params *cltprm)
if(i==ii)
{
ngblabs[ii++] = nlab;
- ++info[ nlab * INFO_NCOLS + INFO_RIVAREA ];
- info[ nlab * INFO_NCOLS + INFO_RIVFLUX ] += arr[*a];
+ ++info[nlab * INFO_NCOLS + INFO_RIVAREA];
+ info[ nlab * INFO_NCOLS + INFO_RIVFLUX]+=values[*a];
}
}
} );
@@ -321,19 +321,24 @@ clumps_get_raw_info(struct clumps_thread_params *cltprm)
}
while(++a<af);
-
- /* Do the final preparations. All the calculations are only necessary for
- the clumps that satisfy the minimum area. So there is no need to waste
- time on the smaller ones. */
+ /* Based on the position of each clump, find a representative standard
+ deviation. */
for(lab=1; lab<=cltprm->numinitclumps; ++lab)
{
+ /* To help in reading. */
row = &info [ lab * INFO_NCOLS ];
+
+ /* The calculations are only necessary for the clumps that satisfy
+ the minimum area. There is no need to waste time on the smaller
+ ones. */
if ( row[INFO_INAREA] > p->snminarea )
{
- /* Especially over the undetected regions, it might happen that
- none of the pixels were positive. In that case, set the total
- area of the clump to zero so it is no longer considered.*/
- if( row[INFO_SFF]==0.0f ) row[INFO_INAREA]=0;
+ /* It might happen that none of the pixels were positive
+ (especially over the undetected regions). In that case, set
+ the total area of the clump to zero so it is no longer
+ considered.*/
+ if( row[INFO_SFF]==0.0f )
+ row[INFO_INAREA]=0;
else
{
/* Find the coordinates of the clump's weighted center. */
@@ -363,7 +368,6 @@ clumps_get_raw_info(struct clumps_thread_params *cltprm)
}
}
-
/* Clean up. */
free(dinc);
free(ngblabs);
@@ -426,7 +430,7 @@ clumps_make_sn_table(struct clumps_thread_params *cltprm)
clumps_get_raw_info(cltprm);
- /* Calculate the signal to noise ratio for successful clumps */
+ /* Calculate the signal to noise ratio for successful clumps. */
snarr=cltprm->sn->array;
if(cltprm->snind) indarr=cltprm->snind->array;
for(i=1;i<tablen;++i)
- [gnuastro-commits] master fbbc2fc 100/113: Imported recent work in master, minor conflict fixed, (continued)
- [gnuastro-commits] master fbbc2fc 100/113: Imported recent work in master, minor conflict fixed, Mohammad Akhlaghi, 2021/04/16
- [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 <=
- [gnuastro-commits] master 05cc693 080/113: Added 3rd dimension to MakeCatalog's minimum-maximum columns, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 0eaf0dc 091/113: Imported recent work in master, conflicts fixed, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 9e2397a 094/113: Imported recent work in master, no conflicts, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 9258f68 096/113: Imported recent work in master, minor conflict fixed, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master d0d8d20 109/113: Imported recent work in master, minor conflicts fixed, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 6e11585 111/113: Imported recent work in master, minor conflicts fixed, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master aa80ac4 112/113: Imported recent updates in master branch, minor conflict fixed, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master dadb3f3 107/113: Imported recent work in master, minor conflicts fixed, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 313d522 099/113: Imported recent work in master, minor conflict fixed, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 536b056 110/113: Imported recent changes in master, conflicts in book fixed, Mohammad Akhlaghi, 2021/04/16