Skip to content
Snippets Groups Projects
  1. Jan 01, 2025
    • Mohammad Akhlaghi's avatar
      All files: copyright years updated to 2025 · 22c7fc70
      Mohammad Akhlaghi authored
      Until now, the copyright on all the Gnuastro source files was 2024. But
      today, we entered 2025!
      
      With this commit, the copyright statement of all the files have been
      updated to an ending year of 2025.
      22c7fc70
  2. Jan 01, 2024
    • Mohammad Akhlaghi's avatar
      All: updated copyright year to 2024 · 88e8cbbc
      Mohammad Akhlaghi authored
      Until now, the copyright date on all the files ended in 2023. However, In
      the last couple of hours we have entered 2024 and 2023 is no longer up to
      date!
      
      With this commit, all the copyright years now end in 2024.
      88e8cbbc
  3. Feb 03, 2023
    • Mohammad Akhlaghi's avatar
      All: updated copyright years to 2023 · 15580cbc
      Mohammad Akhlaghi authored
      Until now, the latest copyright year on all the files was 2022. But it is
      one month that we have moved into 2023.
      
      With this commit, the latest year in the copyright statements is 2023.
      15580cbc
  4. Jan 01, 2022
    • Mohammad Akhlaghi's avatar
      Copyrights: ending year updated to 2022 · a6a5fba4
      Mohammad Akhlaghi authored
      Until now, the ending years in the copyright statements of Gnuastro's
      source were 2021. But 2022 has started from today, so it was time for an
      update!
      
      With this commit, all the ending copyright years in all the Gnuastro source
      files have been changed to 2022.
      
      Since the first commit of Gnuastro (09ac8974) was on the 1st of January
      in 2015, Gnuastro is now officially 7 years old! Unofficially (before that
      first commit), its one year older!
      a6a5fba4
  5. Jan 01, 2021
  6. May 12, 2020
    • Mohammad Akhlaghi's avatar
      All quoted strings now use apostrophe instead of grave accent · b9c48d00
      Mohammad Akhlaghi authored
      Until now, Gnuastro's quoted strings used a grave accent (`) for opening a
      quote and an apostrophe for closing it, something like `this'. But as noted
      by Rafael Morales, this is not very clear to the eye.
      
      So I had a look at the GNU Coding Standards, and noticed that under the
      section "Quote Characters", it also recommends this style: "Although GNU
      programs traditionally used 0x60 (`) for opening and 0x27 (') for closing
      quotes, nowadays quotes `like this' are typically rendered asymmetrically,
      so quoting "like this" or 'like this' typically looks better."
      
      With this commit, this has been corrected in all of Gnuastro, both in the
      printed messages and also the comments in the code.
      
      Also, again as suggested by Rafael, to give a unified interface for quoting
      strings, all the double quotations have been removed in the printed
      messages (in the C source they looked like '\"'). They are now also shown
      with an apostrophe.
      b9c48d00
  7. Dec 31, 2019
  8. Apr 03, 2019
  9. Sep 23, 2016
    • Mohammad Akhlaghi's avatar
      Top level src/ directory renamed to bin/ · 4e785149
      Mohammad Akhlaghi authored
      From this commit, the top level `src/' directory is called `bin/' and all
      occurances of `src/' within the Gnuastro files were also corrected. This
      change was done since `src' is too generic and could cause confusion: is it
      the source of the programs and utilities? How does it relate to `lib/'?
      
      This new name was chosen based on the final installation directory of its
      (main) contents: the executables of the programs within this directory are
      installed in `prefix/bin/', similar to how the libraries (in the top level
      `lib/' directory) are installed in `prefix/lib/'.
      4e785149
  10. May 27, 2016
    • Mohammad Akhlaghi's avatar
      ChangeLog now explains how it is no longer updated · f939b685
      Mohammad Akhlaghi authored
      The ChangeLog update was stopped in each commit following the discussion in
      task #13779. However, this choice was not reflected in the ChangeLog its
      self. So if someone would open the ChangeLog, they would think the last
      change was on November 5th, 2015! To avoid such confusions, an item was
      added to the top of the ChangeLog explaining how we have stopped updating
      it. Two new tasks have thus been defined:
      
       - task #14007: to automatically generate the ChangeLog from the version
         controlled history.
      
       - task #14008: to discuss if it is good to adopt the ChangeLog formatting
         in the commit messages.
      
      This finishes task #13779.
      f939b685
  11. Nov 05, 2015
    • Mohammad Akhlaghi's avatar
      ChangeLog updated on the changes in the manual · 669ad4c5
      Mohammad Akhlaghi authored
      We are planning on removing the ChangeLog (task #13779), but until
      then, it has to be updated. The only change was in the "Why C
      programming language?" section. The newly added sections are totally
      new and are thus not included in the ChangeLog.
      669ad4c5
  12. Nov 04, 2015
  13. Oct 04, 2015
    • Mohammad Akhlaghi's avatar
      NoiseChisel and MakeCatalog: using median for depth not maximum · c23f394c
      Mohammad Akhlaghi authored
      Until now the maximum standard deviation in the meshes was used as the
      depth. However, the maximum has a strong scatter such that one outling
      mesh can completely shift to unreasonable values. So, although the
      maximum standrard deviation is still reported by NoiseChisel, but
      Makecatalog uses the median standard deviation.
      
      I also added a median function to `statistics.[ch]'.
      
      A tiny spelling mistake was also fixed in MakeCatalog's `--help'
      output.
      c23f394c
  14. Oct 01, 2015
    • Mohammad Akhlaghi's avatar
      hstartwcs and hendwcs are available in ImageWarp too · d62e5445
      Mohammad Akhlaghi authored
      Since ImageWarp is also a starting point in reading images with
      non-standard WCS information, I also added this option to
      ImageWarp. If it is needed in all applications, these options can be
      added to the common arguments easily now. The main readfitswcs
      function in lib/fitsarrayvv.[ch] was changed to allow these two values
      for easy generalization if needed.
      d62e5445
  15. Sep 23, 2015
    • Mohammad Akhlaghi's avatar
      MakeCatalog: surface brightness limit and removed mag limit · 1f6a7c17
      Mohammad Akhlaghi authored
      Previously the surface brightness limit and magnitude limit were
      defined in terms of a fixed projected area (arcsec^2) and the S/N of
      the objects or clumps. But in the first case, the projected area
      should not be used since noise is only dependent on the pixel and the
      pixel is the unit of our data-collection. Its physical or projected
      size are irrelevant. In the latter case, the area used to find the S/N
      was not clear and thus this value was very unrealistic. Therefore I
      tried to explain how to use number counts (from the outputs of
      MakeCatalog) in order to estimate the limiting magnitude.
      1f6a7c17
  16. Sep 18, 2015
    • Mohammad Akhlaghi's avatar
      Added --nolog option to the common options · 85380d72
      Mohammad Akhlaghi authored
      When the scripts are run in parallel (for example within a Makefile
      called with the -j option) then the log files can cause problems when
      you want to clean them up in the end. One option was to set the log
      file name to be based on the output file name, but I have not seen
      that commonly and it would require a lot of extra code. But now, when
      the log file doesn't matter, the user can simply igore it being made.
      
      Convolve was not reading the WCS information of the input. A line is
      now added in the ui.c to do the job.
      85380d72
  17. Sep 17, 2015
    • Mohammad Akhlaghi's avatar
      MakeProfile's individual outputs have suffix · db220858
      Mohammad Akhlaghi authored
      The individual outputs of MakeProfiles were simply named as, for
      example, 0.fits, 1.fits and so on. But this would not work when
      MakeProfiles is to be run in parallel and is also ambiguous. So now
      the row numbers are suffixed by the output file name and put into the
      output directory.
      
      The output directory and file name fixing in MakeProfiles was also
      bugy with problems I hadn't noticed before, so I fixed it.
      
      In order to do this job, two functions were added in checkset.c:
      `dirpart' and `notdirpart'.
      
      A new subsection was also added to the manual explaining the two basic
      methods to run processes simultaneously.
      db220858
  18. Sep 13, 2015
    • Mohammad Akhlaghi's avatar
      Same as commit 0e8bfe3a · 2ab9d7bf
      Mohammad Akhlaghi authored
      It was necessary that the branch for the NoiseChisel paper
      reproduction (version 0.0) would be separate from all the work that
      was done on the programs after the last proof submission of the
      paper.
      
      After the paper was published, I completed the reproduction system and
      in the process, some issues needed to be added or fixed in the
      programs. They were all applied to that branch. But they are all also
      necessary for the future versions of Gnuastro, so they were done
      independently here.
      2ab9d7bf
    • Mohammad Akhlaghi's avatar
      Reproducible arXiv release of NoiseChisel paper · 0e8bfe3a
      Mohammad Akhlaghi authored
      The following changes were made to make the first reproducible arXiv
      release (arxiv:1505.01664, v2). The major additions are:
      
        - The `--onlydirconf' option was added to the common options. When
          called, only the current directory configuration files are read
          (not the system or user wide configuration options). This will
          allow much easier control over what parameters go into the running
          of a program, which is very useful when reproducibility is
          concerned.
      
       - The `--onlyversion' option was added to the common options. When
         called, the version of the program is checked with the value to
         this option, and if they aren't exactly equal, the program will not
         run. This is crucial for reproducibility.
      
       - Added the READ_COMMONOPTIONS_FROM_CONF macro to configfiles.h to
         read common configuration options from a configuration file. Until
         now, there was only the `--numthreads' option, and each program had
         a step to read it, but with the new `--onlydirconf' option, it
         required now too much repetition to be read in each program
         independantly. So this macro was defined and is used by all the
         programs.
      
       - Added the macro PRINT_COMMONOPTIONS, similar to above, this is done
         to make things more clearer and remove bugs.
      
       - Added the `astrthreads.h' headers to `spatialconvolve.h' to avoid
         problems with systems that don't support pthread_barrier_t.
      
       - Added the `--mirrordist' option to ImageStatistics to set the
         maximum distance beyond the mirror.
      
       - Added the `--maxblankfrac' option to ImageWarp so if a large
         fraction of an output pixel is covered by blank pixels, it is set
         to blank. Before the blank fraction was ignored.
      gnuastro_v0.0
      0e8bfe3a
  19. Aug 24, 2015
    • Mohammad Akhlaghi's avatar
      makekernel max radius, smaller output if necessary · ba977405
      Mohammad Akhlaghi authored
      The --makekernel option in Convlve, now gets an argument that is the
      maximum radius to keep non-zero kernel values. The output kernel will
      also be cropped to only be large enough to have no only-zero rows or
      columns.
      
      This was done because the high frequencies were set to zero during the
      division and so the larger radii would become too flat. So the user
      can specify how far out the final kernel should be.
      
      Also a minor bug fix in NoiseChisel: The check to see if the number of
      clumps or detections is more than the minimum specified by the user is
      now done before anything else. In the case of zero good S/N values,
      this would cause a problem in the next steps.
      ba977405
  20. Aug 05, 2015
  21. Jul 31, 2015
    • Mohammad Akhlaghi's avatar
      Better frequency domain explanations · cd856d0f
      Mohammad Akhlaghi authored
      Two new sections were added to explain the Discrete Fourier transform
      and how they change in 2 dimensions. I also went through all the other
      explanations and made the whole frequency space explanations more
      cogent.
      cd856d0f
  22. Jul 29, 2015
    • Mohammad Akhlaghi's avatar
      Grown clump S/N and clump quantile bugs fixed · 0e1f133d
      Mohammad Akhlaghi authored
      There were two bugs that are now fixed:
      
        - MakeCatalog: In a grown clump label image, the detections that
          have one or no clumps are fully filled. So there is no river
          pixels for them. I had not corrected the clump S/N calculations in
          MakeCatalog also consider this. Now this issue is corrected.
      
        - MakeCatalog: Although brightness was correctly calculated, in the
          final printing, it would be divided by the area! It is now fixed.
      
        - NoiseChisel: When finding the S/N quantile for clumps, it was
          mistakenly using the detection S/N quantile for both clumps and
          detections! Now it uses the correct value. Until now, these two
          were always the same, so I hadn't noticed this!
      0e1f133d
  23. Jul 18, 2015
  24. Jul 17, 2015
    • Mohammad Akhlaghi's avatar
      Header WCS region added to ImageCrop, fixed bug in NoiseChisel · 1c0e7c37
      Mohammad Akhlaghi authored
      Additions
      =========
      
      - ImageCrop: Added the two options `--hstartwcs' and `--hendwcs' to
        read specific portions of the input file's header. As explained in
        the manual this is necessary now that WCSLIB includes distortion in
        the coordinates but old FITS files were written with the assumption
        that WCSLIB does not support them.
      
      Bug fixes
      =========
      
      - NoiseChisel: The flux weighted center of the detections (which are
        used to find the sky standard deviation on the mesh grid) used the
        flux of all the pixels. But a weight can only have a positive value!
        So the negative values would make the result go wrong. Now, the xys
        array has a third column to keep the sum of positive flux pixels
        which were used as weights in finding the flux weighted center.
      1c0e7c37
  25. Jul 07, 2015
    • Mohammad Akhlaghi's avatar
      MakeCatalog: now correctly identifies river pixel information · 9aa54b98
      Mohammad Akhlaghi authored
      To get the river information of each clump, I had mistakenly just
      copied from the getclumpinfo function in NoiseChisel's
      clumps.c. However, over there all the clumps were within one
      detection. So the IDs of neighboring clumps (to a river pixel) were
      unique. But in MakeCatalog, two clumps can be separated by one river
      pixel and belong to separate objects with different object IDs.
      
      Another consequence was to use the object ID from the neighbor of the
      river pixel and not the object on which the river lies.
      
      The total brightness of the clump is also stored internally. Only when
      we want to write it to the catalog, do we subtract the average river
      flux multiplied by the number of clump pixels.
      9aa54b98
    • Mohammad Akhlaghi's avatar
      Corrected numblank to anyblank · 5059588f
      Mohammad Akhlaghi authored
      In the fitsarrayvv.c functions, I had mistakenly used a variable
      called `numblank'. Some time in the past, this variable probably
      actually did mean the number of blanks. But now it was only a boolean
      value specifying if there are any blanks in the input or not. So I
      renamed all wrong occurances of `numblank' (as relates to the input
      image and FITS blank pixels) to `anyblank' which correctly represents
      what this variable holds.
      
      Note that NoiseChisel's segmentation does make use of a similarly
      termed variable for the number of pixels left to grow. That is a
      different usage and those variable names were left unchanged.
      5059588f
  26. Jul 06, 2015
    • Mohammad Akhlaghi's avatar
      NoiseChisel bug fixed by 8 connected labeling · 7300ebf6
      Mohammad Akhlaghi authored
      Until now, in labeling the dilated image, I used 4-connected
      components. However, in the segmentation step, the 8-connected
      neighbors of each river pixel are checked. When the rivers of the
      edges of the detections are checked, these two different neighbor
      definitions would cause a problem: two separate 4-connected regions
      can be 8-connected.
      
      The fix of this bug was a simple change of `4' to `8' in the main
      NoiseChisel function. However it took me several (very frustrating)
      hours to find it! While Valgrind's messages are usually very useful,
      in this case (because they resulted from my own convention), they
      caused even more confusion. The valgrind error said something like
      this: "You are trying to reference an internal array of another
      function that was allocated and freed in another funciton". In short
      the array it was complaining about didn't exist when the function
      giving the error was called!!! This really confused me! I finally
      found it through individual checks of all the detections without using
      Valgrind.
      
      In the meantime, I also removed all the checks for NaN (masked) pixels
      in oversegment (clumps.c). Since NaN pixels are no longer in the
      indexs that are fed to this function.
      7300ebf6
  27. Jul 05, 2015
    • Mohammad Akhlaghi's avatar
      Corrected `Brightness' and `flux' · 0d147a26
      Mohammad Akhlaghi authored
      Throughout Gnuastro, until now, I had used flux and brightness
      interchangeably while this is only true for one pixel. So for example
      using terms like "total flux" for the sum of pixels is wrong. I have
      explained everything completely in the "Flux Brightness and magnitude"
      subsection of the manual. All the programs (mainly variable names and
      option explanations) and the manual were corrected to make the proper
      distinction between these two terms.
      
      Also the other MathJax scripts that might be necessary for the HTML
      webpages to be run with LibreJS were also added. However, LibreJS
      still doesn't recognize the scripts. I have asked
      help-librejs@gnu.org.
      0d147a26
  28. Jul 04, 2015
    • Mohammad Akhlaghi's avatar
      Detection limit and depth expressed in catalog comments · eab6c56d
      Mohammad Akhlaghi authored
      The detection limit of the image for clumps and objects is now
      reported in the output of MakeCatalog. In order to do this, I had to
      save the S/N thresholds in NoiseChisel to header keywords in the
      NoiseChisel outputs. MakeCatalog then reads those headers and makes
      the information. The manual also contains a complete explanation.
      
      I also had to update the old "readkeyword" function in fitsarrayvv.c
      to "readkeywords". Now it can read as many keywords as the user wants.
      eab6c56d
  29. Jul 03, 2015
    • Mohammad Akhlaghi's avatar
      MakeCatalog handels blank labeled pixels · a6f4ed63
      Mohammad Akhlaghi authored
      Until now, MakeCatalog was not prepared to handle blank pixels in the
      labeled images. But now, the labeled pixels are easily ignored.
      
      I also added the names of the input files in the catalogs and also a
      column specifying the 5 sigma magnitude in the input image.
      a6f4ed63
  30. Jun 26, 2015
    • Mohammad Akhlaghi's avatar
      NoiseChisel S/N values found over full image, ignore masks · b48ce16d
      Mohammad Akhlaghi authored
      NoiseChisel underwent to large changes. Mainly as a result of the
      previous addition to ImageCrop where an arbitary polygon could be
      cropped. So I had to find a way to treat large blank areas in a the
      image.
      
        1. The S/N value was previously found on each large mesh separately
           and would be interpolated and smoothed! On each mesh there
           usually isn't enough area to provide the right number of
           points. Unlike the sky and its standard deviation (noise) which
           can vary over the image, the Signal to noise ratio will only
           change when the data have different noise properties, for example
           more or less correlated noise. This can happen in an image,
           especially in surveys but it doesn't have to be on the same grid,
           so there will be problems.
      
           Now that ImageCrop can crop out an arbitary polygon, we can crop
           out the parts that have similar noise properties and work on
           them. Over the image the number statistics will be much better
           (for example in estimating the quantile). So NoiseChisel will now
           calculate the detection and segmentation Signal to noise ratios
           over the full image, not within one mesh.
      
        2. Since I wanted to work on a random polygon a large area of the
           image would be blank. Until now, I had not really put too much
           emphasis on blank pixels, but since their number significantly
           increased I had to find a solution. Now NoiseChisel's functions
           also account for unsigned char and long type blank values too.
      b48ce16d
  31. Jun 25, 2015
    • Mohammad Akhlaghi's avatar
      ImageCrop's outpolygon option now set and tested · 9566549e
      Mohammad Akhlaghi authored
      I had forgot to confirm if the old `--inpolygon' option actually
      worked! So I tried it out and saw that it is much better if it is
      `--outpolygon'! Since by default only the region inner to the polygon
      is shown, so the old method was mostly redundant. In the few cases
      that the user would want to keep the outer parts, they would have to
      go and change all their configuration files! Now this option is not in
      configuration files any more.
      
      A test was also written for this option.
      9566549e
    • Mohammad Akhlaghi's avatar
      ImageCrop's polygon tests written in both image and WCS modes · 4e746a26
      Mohammad Akhlaghi authored
      The polygon mode was tested in the WCS mode and some corrections
      needed to be made for the steps I wrote last night. It now works very
      nicely both in image mode and WCS mode.
      
      Two tests were also added to accompany this new feature.
      4e746a26
  32. Jun 13, 2015
    • Mohammad Akhlaghi's avatar
      MakeCatalog now reads the inputs · b006be48
      Mohammad Akhlaghi authored
      MakeCatalog's ui.c is complete for now (all the inputs are read). In
      order to make things clear and elegant, I made a clear function to
      check for data in other extensions of an image or in another file
      depending on the user input.
      
      Until now, there was a macro in checkset.h and also a function in
      fitsarrayvv.c which done the job almost similarly. The mask checking
      functions of all the programs were updated.
      b006be48