General Questions

169 views
Skip to first unread message

Umair Khan

unread,
Feb 28, 2018, 4:36:24 PM2/28/18
to OpenStartracker
I've been playing around with the program for a couple of days now, and I've come across several questions. I hope you don't mind answering them.
  1. Why is each image analyzed twice in unit_test.sh?
  2. Why do median_image.png, image7.bmp, and image9.bmp not generate DEC/RA output? Is this because the program can't calculate it?
  3. When running the ESA test, there's a lot of numbers coming on the screen. Am I correct in assuming that the actual ESA score is the number on the 100th line of output?
  4. What is in the .txt files that are generated with each run? Are they important for the program or the user in some way?
  5. Do sample images have to be .bmp? I made a new "camera" and put in .png versions of the sample images in xmas, and the program crashed with a ValueError.
And this is more of a general question, but how/where do I get sample images to test the program with? The sample images in the repository look very different from standard star images. Right now, putting in basically anything else results in the following error (this is the same error from question 5, but that error happens in calibrate.py).

Traceback (most recent call last):
  File "startracker.py", line 435, in <module>
    exec(data)
  File "<string>", line 1, in <module>
  File "startracker.py", line 323, in solve_image
    self.current_image=star_image(imagefile,self.median_image)
  File "startracker.py", line 127, in __init__
    img=np.clip(img.astype(np.int16)-median_image,a_min=0,a_max=255).astype(np.uint8)
ValueError: operands could not be broadcast together with shapes (397,561,3) (1040,1392,3)

I'm assuming this is because I'm doing something wrong with the image, but I don't know what, so how would one get more sample images to test with correctly?
 
Thanks so much for your help.

Andrew Tennenbaum

unread,
Feb 28, 2018, 9:48:04 PM2/28/18
to OpenStartracker


On Wednesday, February 28, 2018 at 4:36:24 PM UTC-5, Umair Khan wrote:
I've been playing around with the program for a couple of days now, and I've come across several questions. I hope you don't mind answering them.
  1. Why is each image analyzed twice in unit_test.sh?
So, the first time it does a lost in space solution using the minimum amount of stars, while the second time  it uses that solution to obtain ID's for all of the images
  1. Why do median_image.png, image7.bmp, and image9.bmp not generate DEC/RA output? Is this because the program can't calculate it?

Median image is an image which contains no stars. This is included as a regression test to make sure that the startracker does not produce false positives in the  case of images with no stars

The images 7 and 9 actually are actually two frames of our camera image simulator superimposed on top of each other. They actualshould not solve, as it is ambiguous

  1. When running the ESA test, there's a lot of numbers coming on the screen. Am I correct in assuming that the actual ESA score is the number on the 100th line of output?
That is correct. I have found that performance will be good if the score is above 70.
 
  1. What is in the .txt files that are generated with each run? Are they important for the program or the user in some way?
Yes, calibration.txt is the main deliverable of the calibration procedure. once the procedure is complete, you would do something like ./build-production.sh name-of-your-folder
  1. Do sample images have to be .bmp? I made a new "camera" and put in .png versions of the sample images in xmas, and the program crashed with a ValueError.
And this is more of a general question, but how/where do I get sample images to test the program with?
 
To get images, go out with your camera on a clear night,  and take a bunch of images with your camera. A good exposure time will have less stars than you think - too many can actually increase the failure rate. These images must all be of different parts of the sky
 
The sample images in the repository look very different from standard star images. Right now, putting in basically anything else results in the following error (this is the same error from question 5, but that error happens in calibrate.py).

The error message is because you need to make a new folder structure for your images. See below:

Traceback (most recent call last):
  File "startracker.py", line 435, in <module>
    exec(data)
  File "<string>", line 1, in <module>
  File "startracker.py", line 323, in solve_image
    self.current_image=star_image(imagefile,self.median_image)
  File "startracker.py", line 127, in __init__
    img=np.clip(img.astype(np.int16)-median_image,a_min=0,a_max=255).astype(np.uint8)
ValueError: operands could not be broadcast together with shapes (397,561,3) (1040,1392,3)

I'm assuming this is because I'm doing something wrong with the image, but I don't know what, so how would one get more sample images to test with correctly?


you need to make an empty directory structure:

tests/your-calibration/samples
tests/your-calibration/calibration_data

put your images in tests/your-calibration/samples

then run ./unit-test -crei your-calibration to calibrate using those images.
you will need to make sure that they can solve on nova.astrometry.net first. if they don't, you can play around with exposure time. For best performance,use the lowest exposure time that solves


Note the ./unit-test -crei is for calibration purposes. to actually run it on flight hardware, you'll want to package it up (without all of the git stuff). Edit build-production.sh to suit your needs, then run ./build-production.sh

Thanks so much for your help.


Any time! having other people using openstartracker is actually a huge help to me


Reply all
Reply to author
Forward
0 new messages