Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is this working? #25

Open
LuisGoncalves1 opened this issue Mar 24, 2021 · 4 comments
Open

Is this working? #25

LuisGoncalves1 opened this issue Mar 24, 2021 · 4 comments

Comments

@LuisGoncalves1
Copy link

Hello,
Is this code working? It says its in the process of rewriting.
How can i process one image?

@Solarer
Copy link
Collaborator

Solarer commented Mar 25, 2021

Hi, the code is not maintained anymore.
It does work but there have been many changes to other 3rd party libraries so you need to fix a few things before you can use it again.

If you follow these instructions you will get a minimal running demo but to get all features running, you will need to invest some time yourself. I did not test it all.

  1. Clone the git repository
  2. open the GTC_cam.config file (it is somewhere in the git repo) and add moonExposureFactor = 1 in the [analysis] section.
  3. edit file io.py and replace line 170 like this: img = imread(filepath, as_gray=True)
  4. install the package with pip by navigating into the folder and running (pip install .)
  5. Run (starry_night -h) See if you can see the help menu and install any missing dependencies until you can see it.
  6. A few years ago the code downloaded pictures automatically, but that works only at night. I recommend downloading a picture manually (http://www.gtc.iac.es/multimedia/webcamPopup.php?webcam=skycam). Save it as jpg on your pc.
  7. The code extracts the timestamp from the filename. So rename the picture exactly like this: gtc_allskyimage_20210325_030000.jpg (remember that the code will not run if it thinks that it is during the day! Select a time at night. In the best case, you picture was taken at night. Then choose the correct date.)
  8. Once all of that is done, execute:
    starry_night -c GTC /path/to/your/picture/gtc_allskyimage_20210325_030000.jpg --cam -v -s
    that worked for me.

If you want to use your own all sky cam, you will need to create your own config file. You can find a template and examples in the git repo. Basically you need to set the location coordinates of you cam, define some cropping so that you cut out stuff from the image that you do not need. And then guess good values for the [image] section. That defines where the zenith is in your picture and how the camera distorts the image. It depends on the camera lens you have and you need to figure it out by trial and error. Using the GTC cam you should have a good point to start. Play around with the values until you understand what they do and then create your own file. I recommend using a star catalogue program such as kstars. That helps in finding the zenith on the sky.
You can then do
starry_night -c /path/to/your/config /path/to/your/picture/folder --cam -v -s
to work with your own pictures. Make sure that all pictures were taken at night and that the filename contains the correct timestamp!

Good luck!

@Solarer
Copy link
Collaborator

Solarer commented Mar 25, 2021

raw picture
gtc_allskyimage_20210325_030000

processed picture
cam_image_GTC_2021-03-25T02:53:00

@Solarer
Copy link
Collaborator

Solarer commented Mar 25, 2021

That picture was taken during the day and I forced the timestamp to be 3 am in the morning. That's why no stars have been detected. I recommend downloading a picture at night without moon and no clouds/fog for the best results.
If you get it working, check out the help page and get ready to dive deep into the code.

@Solarer
Copy link
Collaborator

Solarer commented Mar 25, 2021

The --cam -v flags should display the result directly on your screen, but it does not work for me. Maybe it is broken.
The -s flag saves the result in your current directory. So check that out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants