[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master 0597cea 058/113: Imported work in master, no c
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master 0597cea 058/113: Imported work in master, no conflicts |
Date: |
Fri, 16 Apr 2021 10:33:46 -0400 (EDT) |
branch: master
commit 0597cea81f21e8577819cced3464026c608f96c0
Merge: 9285abe e958450
Author: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Imported work in master, no conflicts
There were no conflicts in this merge.
---
bin/segment/segment.c | 23 ++++++++++++++---------
lib/table.c | 7 ++-----
2 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/bin/segment/segment.c b/bin/segment/segment.c
index da38458..312f325 100644
--- a/bin/segment/segment.c
+++ b/bin/segment/segment.c
@@ -591,11 +591,13 @@ segment_on_threads(void *in_prm)
if(clprm->step==1 || p->checksn)
{ gal_data_free(topinds); continue; }
+
/* Only keep true clumps and abort if the user only wants clumps. */
clumps_det_keep_true_relabel(&cltprm);
gal_data_free(topinds);
if(clprm->step==2) continue;
+
/* When only clumps are desired ignore the rest of the process. */
if(!p->onlyclumps)
{
@@ -717,14 +719,16 @@ segment_save_sn_table(struct clumps_params *clprm)
int32_t *oiarr, *cioarr;
gal_list_str_t *comments=NULL;
size_t i, j, c=0, totclumps=0;
- gal_data_t *sn, *objind, *clumpinobj;
struct segmentparams *p=clprm->p;
+ gal_data_t *sn, *objind, *clumpinobj;
/* Find the total number of clumps in all the initial detections. Recall
that the `size' values were one more than the actual number because
the labelings start from 1. */
- for(i=1;i<p->numdetections+1;++i) totclumps += clprm->sn[i].size-1;
+ for(i=1;i<p->numdetections+1;++i)
+ if( clprm->sn[i].size > 1 )
+ totclumps += clprm->sn[i].size-1;
/* Allocate the columns for the table. */
@@ -744,13 +748,14 @@ segment_save_sn_table(struct clumps_params *clprm)
oiarr=objind->array;
cioarr=clumpinobj->array;
for(i=1;i<p->numdetections+1;++i)
- for(j=1;j<clprm->sn[i].size;++j)
- {
- oiarr[c] = i;
- cioarr[c] = j;
- sarr[c] = ((float *)(clprm->sn[i].array))[j];
- ++c;
- }
+ if( clprm->sn[i].size > 1 )
+ for(j=1;j<clprm->sn[i].size;++j)
+ {
+ oiarr[c] = i;
+ cioarr[c] = j;
+ sarr[c] = ((float *)(clprm->sn[i].array))[j];
+ ++c;
+ }
/* Write the comments. */
diff --git a/lib/table.c b/lib/table.c
index a263700..e22fb4b 100644
--- a/lib/table.c
+++ b/lib/table.c
@@ -493,10 +493,8 @@ gal_table_comments_add_intro(gal_list_str_t **comments,
char *program_string,
/* Get the Git description in the running folder. */
tmp=gal_git_describe();
- if(tmp) sprintf(gitdescribe, " from %s,", tmp);
- else gitdescribe[0]='\0';
- free(tmp);
-
+ if(tmp) { sprintf(gitdescribe, " from %s,", tmp); free(tmp); }
+ else gitdescribe[0]='\0';
/* Git version and time of program's starting, this will be the second
line. Note that ctime puts a `\n' at the end of its string, so we'll
@@ -507,7 +505,6 @@ gal_table_comments_add_intro(gal_list_str_t **comments,
char *program_string,
tmp[ strlen(tmp)-1 ]='\0';
gal_list_str_add(comments, tmp, 0);
-
/* Program name: this will be the top of the list (first line). We will
need to set the allocation flag for this one, because program_string
is usually statically allocated.*/
- [gnuastro-commits] master 61aec7b 019/113: Convolve name and dimensionality checks, (continued)
- [gnuastro-commits] master 61aec7b 019/113: Convolve name and dimensionality checks, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 4627ddf 021/113: NoiseChisel segmentation working in 3D, test added, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 1560a54 022/113: Default NoiseChisel kernel in 3D changed to 1.5 pixels, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 4d2508f 028/113: Fixed NoiseChisel opening and dilation and merged with master, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 4223e60 025/113: Suggestions on viewing/inspecting NoiseChisel's output, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 6086579 031/113: Merged recent work in master (corrected conflicts), Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master b0d5fab 034/113: Merged recent work from master, no conflicts, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 06798a5 035/113: Crop's --checkcenter works on 3D dataset, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master fd51c80 050/113: Imported recent work from master, no conflicts, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master a4dbaba 055/113: Recent work in master imported, minor conflict fixed, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 0597cea 058/113: Imported work in master, no conflicts,
Mohammad Akhlaghi <=
- [gnuastro-commits] master e11098d 053/113: Recent work in master imported, minor conflicts fixed, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 0a8324f 059/113: MakeProfiles kernel option can be elongated in 3rd-dimension, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master ec3c102 056/113: Single to conditionally open ds9 for multi-HDU 2D or 3D, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 2491c91 064/113: Imported work in master, minor conflict in book fixed, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 9dda05c 040/113: Merged recent work from the master branch with corrections, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 218a7db 041/113: Brought in recent work from master, corrections made, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 6f4e484 032/113: Merged with recent updates in master, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 4fedb9d 038/113: Merged with master, conflicts fixed, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 325d717 045/113: 3D matching now in Match program and library, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master d7e0037 047/113: Brought in recent work in master, Mohammad Akhlaghi, 2021/04/16