×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Median computation in FitsViewer wrong?

  • Posts: 61
  • Thank you received: 2
I have seen this from time to as well... .
Regards

Dirk
4 years 1 month ago #50086

Please Log in or Create an account to join the conversation.

  • Posts: 985
  • Thank you received: 160

Thanks a lot for looking into this, Hy!

In order to get one of these pictures I took another Bias frame with my ASI 294Pro and this time all 3 medians were zeroes.



The corresponding FITS file can be downloaded here: www.sendspace.com/file/2b6l4w

Recently I saw another Bias where only the red channel showed a zero. In fact all these zero values are wrong.

Another example:



EDIT: I'm running the latest nightly build.

Thanks again and CS!
The following user(s) said Thank You: Hy Murveit
Last edit: 4 years 1 month ago by Alfred.
4 years 1 month ago #50100
Attachments:
  • median1.png
  • screenreco...7.43.mp4

Please Log in or Create an account to join the conversation.

  • Posts: 1208
  • Thank you received: 559
This should now be fixed in the nightly build. See phabricator.kde.org/D27670

Thanks for your help in finding the issue and uploading the image.
The following user(s) said Thank You: Alfred
4 years 1 month ago #50164

Please Log in or Create an account to join the conversation.

  • Posts: 985
  • Thank you received: 160
Thanks, Hy for fixing the issue. Unfortunately I now don't get any Bias frames at all anymore. They're all 100% black. This is what happens:



I'm unsure whether this is related to your fix but the functionality is broken for sure. Maybe a side effect?
4 years 1 month ago #50167
Attachments:

    screenreco...3.56.mp4

Please Log in or Create an account to join the conversation.

  • Posts: 1208
  • Thank you received: 559
Alfred,

I'm sorry but, unfortunately, I just tried and couldn't reproduce.

To make things easier to diagnose, can you please try a few things if you're comfortable with them?

1) does this also happen with the similuator? (e.g. start up ekos/indi with the simulator profile and try to take some bias images). The simulator will default to monochrome, but if there's no issue in monochrome, also try it with color enabled by going to the indi control panel --> CCD Simulator --> Simulator Config and change to bottom option (Simulate RGB) to Yes and retry. You should see some color noise in the bacground Dark and Light images if you've turned this on properly.

2) Assuming you're comfortable compiling code, can you revert my change and try it? If you run 'git log --oneline' in your kstars source directory, you'll see something like this:

4aa28d36b (HEAD -> save-solver-accuracy) Merge branch 'master' into save-solver-accuracy
6ce69709a (origin/master, origin/HEAD, master) Check for errors in WCS transformation
11f68d971 Correct bug in median computation
3d0dc033f Save solver accuracy
0d418a390 Make sure all image files perm
...

You could run 'git checkout 3d0dc033f' to go to the submit before the median change, and then recompile and re-test.
If you still have the problem, and are inspired, could you find out which submit is the problem?

After your test, you can get back to the latest code with 'git checkout master'

Thanks,
Hy
The following user(s) said Thank You: Alfred
4 years 1 month ago #50173

Please Log in or Create an account to join the conversation.

  • Posts: 1208
  • Thank you received: 559
The other thing that's odd is that I don't really know what the impact of changing from Bias to Dark to Bias (same exposure) would be, other than changing the file name & directory.
Does anyone know if there is some other difference? I didn't see anything in the code that called out to me.
4 years 1 month ago #50174

Please Log in or Create an account to join the conversation.

  • Posts: 985
  • Thank you received: 160
Bias frames AFAIK are taken at the camera's shortest possible exposure time. The file names refer to what was selected in Ekos but in fact this is wrong. In the ASI 294's case it's something like 0.00032s exposures for Bias frames. I've compiled from git before but never done any "checkout tricks". I'll try and report back...
4 years 1 month ago #50175

Please Log in or Create an account to join the conversation.

  • Posts: 985
  • Thank you received: 160
With simulators Bias frames work correctly, both monochrome and color.
4 years 1 month ago #50176

Please Log in or Create an account to join the conversation.

  • Posts: 1208
  • Thank you received: 559
Yes, that appears to be the case.
Looking at the source inside of indi, in the file: /indi/libs/indibase/indiccd.cpp

if (PrimaryCCD.getFrameType() == CCDChip::BIAS_FRAME)
PrimaryCCD.ImageExposureN[0].value = ExposureTime = PrimaryCCD.ImageExposureN[0].min;
else
PrimaryCCD.ImageExposureN[0].value = ExposureTime = values[0];
4 years 1 month ago #50178

Please Log in or Create an account to join the conversation.

  • Posts: 985
  • Thank you received: 160
OK, that checkout thing appears to work as expected. :) I checked out at b9dbfa720, compiled and tested. My problem (empty Bias frames) persists hence cannot be related to your fix. I'll try a few other things and once I've found out what causes this issue I'll report back again. Many thanks for your help, much appreciated!
Last edit: 4 years 1 month ago by Alfred.
4 years 1 month ago #50179

Please Log in or Create an account to join the conversation.

  • Posts: 1208
  • Thank you received: 559
BTW, I noticed the 'git checkout ..." example I gave you was from an experimental branch, so the ID string for the submit before the median fix was wrong.
You probably noticed that, but just in case, here is the log list for the head of the tree right now:

> git log --oneline | head -20
6ce69709a Check for errors in WCS transformation
11f68d971 Correct bug in median computation
0d418a390 Make sure all image files permissions end up 644
b9dbfa720 v3.4.1 release
5632a36a1 Do not calculate download time or send image when upload mode is LOCAL
1d72ab065 Adding test for Ekos start/stop.
...

So, to go to the submit before the median fix you may want to try
git checkout 0d418a390

Then you could run
git status

and you'd see:
HEAD detached at 0d418a390
nothing to commit, working tree clean

and then go back to the recent with
git checkout master

and to verify, you'd run
git status

and you should see

On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean

Thanks,
Hy
4 years 1 month ago #50180

Please Log in or Create an account to join the conversation.

  • Posts: 1208
  • Thank you received: 559
Thanks. Please don't hesitate to ask for help.
Please also double check to make sure you're really running the older binary (I've made that mistake before).

Hy
4 years 1 month ago #50181

Please Log in or Create an account to join the conversation.

Time to create page: 0.347 seconds