Photometry, SiriL and Mac

After some time playing with astrophotography, recently I’ve started to perform photometry. I’m using an OSC camera, so the first step after calibration, and without debayering the sequences, is extracting the green chanel and work with it. Perfect, it works like a charm. Then my problems stated

  • When I perform a PSF for the sequence and shows the magnitude plot… it appears inverted. I mean, bigger magnitude values represent, lower brightness, so we you draw the curve of a RR Lyrae variable near its maximum, you get a bowl :slight_smile:

So, perhaps when the Y value is magnitude, it will be useful to invert the Y axis.

  • If I select some other stars and try to export the light curve I receive an error. Yes, I have gnu plot installed on my computer (if I type gnuplot on a terminal, it runs perfectly fione). Perhaps the problem is that gnuplot is not located at /usr/bin, but at /opt/homebrew/bin/gnuplot. And not, the solution is not to generate a symlink to it on /usr/bin, because this folder on recent versions of macOS is read-only. Yes I know that you can bypass this restriction, but then I’ll be fired :slight_smile:

I’ve read the SiriL source code and it seems to me that it simply ask for the path to a system library, so no special handling is done… and this is bad for us, Mac users.

I’ve tried to compile it on my Mac (with an M1 processor), but unfortunately it doesn’t compile. Again I’m getting errors related with omp library

…/src/core/siril.h:14:10: fatal error: ‘omp.h’ file not found
#include <omp.h>

So I can’t investigate the problem any farther by myself.

  • The worst part is that when Siril doesn’t find gnuplot, it neither generate the .dat file with the photometric data. Could at least this file will be generated?. I mean, first generate the file and then, if available, run it through gnuplot.

And last, but not least will be an option to generate a synthetic Luminosity file from OSC data. I mean, you have 2G+R+B pixels on each 2x2 binned pixel or “super pixel”. As we know that those filters are for visual observation, we can apply the NTSC

Gary = 0.299 ∙ Red + 0.587 ∙ Green + 0.114 ∙ Blue

And then save it as a binned mono image. What do you think about this? I know that the less your manipulate your images before measuring them, the best. But the problem is that the bayer matrix interferes with the measurement.

I know that extracting the green chanel, I’m in some way avoiding this problem, but at the same time I’m loosing a lot of light.

For example, look at this frame:

The Bayern pattern is perfectly visible on the background and over the star I’ll mesure. Then if we look at the green chanel extracted for this picture

It looks nicer, but I’ve lost all the R and B pixels from it. What do you think?

Hi Rafa!
Yes magnitudes work inverted, I think in the gnuplot export it’s inverted, maybe we could consider doing it here too.

What i see in the code for gnuplot, we just use the gnuplot command, so if it’s in the PATH it should be found, I don’t understand why it fails. Indeed we could generate the data file anyway in that case…

I don’t know the compilation details for mac, but if omp.h is not there I don’t know how _OPENMP can be defined… Maybe a -I is missing in our build system?

Using R and B for photometry will make strange things because all stars don’t have the same color, so relative magnitudes will not be preserved. I don’t know if we should do that. Keeping only the green will result in half image dimensions, so indeed there is less energy to add to compute magnitudes.

1 Like

Always same issue. MacOS testers are not a lot and we do not develop on it :slight_smile:

You need to have openmp to compile Siril. But compiling Siril on macOS is a real pain, trust me. Because the clang version on macOS doesn’t allow to use openmp…

Yes and it is the way you need to do it. Not building a synthetic channel where photometric data will be wrong. The extract green channel is done for that.

Yes but final light curve is ok. Here this is just transient plots.

It is not that simple. Just because we generate data file with a gnuplot library that needs gnuplot.

1 Like

This last comment explains the problem, so… I’ll live with inverted plots and csv files :slight_smile:

Yes, but as @vinvin said, if you can start gnuplot by typiing gnuplot in the console, then Siril should detect it.
We use:
gnuplot -e > /dev/null 2>&1

Yes, yes I know; I’ve look at the source files. And this what I don’t understand:

➜ ~ gnuplot -e > /dev/null 2>&1
➜ ~ echo $#
0

So this is the expected behaviour. But when I try to use gnuplot from Siril, it fails.

Strange indeed…
What if you use these binaries for gnuplot?
https://csml-wiki.northwestern.edu/index.php/Binary_versions_of_Gnuplot_for_OS_X

No luck, same behaviour

probably the PATH variable (or a mac equivalent) is not set the same way in siril and in your terminal? or maybe mac OS X needs a full path for this call

Could you start Siril from the command line?
/Applications/Siril.app/Contents/MacOS/siril

Bingo! running from the command line worked. Do you know why?

Probably because PATH is not well defined in the Bundle. In don’t really know, If a macOS guru could help us.

Same bug is reported in appImage version.
In fact, this is a “bundle” thing. Need to understand how to do it.

It was in fact easy :wink: