Camera control for astrophotography (was Re: eos M10 port)

  • 3 Replies
  • 247 Views
Camera control for astrophotography (was Re: eos M10 port)
« on: 03 / April / 2018, 15:58:14 »
Advertisements
Thanks, after your suggestion I was able to use also the shoot_full function that is much better for my project (the shoot i seems bugged in chdkptp.py when the time is longer than 30 seconds on the M10).

I attach here the first version of the code I wrote for astrophotography.
It contains the control of the camera, the control of a motor with GPIO (on a Pine64, it should work also on Raspberry PI if the gpios numbers are modified) that I use for the focuser and the integration with astrometry.net to solve the image, extract the coordinates and send them to a mount that uses the MEADE protocol.

The code is not easily reusable (it is strongly adapted to my needs and I didn't put a decent error handling) but I am available to help someone else if he/she wants to run it.
« Last Edit: 03 / April / 2018, 16:42:55 by reyalp »

*

Offline reyalp

  • ******
  • 11339
Re: Re: eos M10 port
« Reply #1 on: 03 / April / 2018, 16:16:49 »
I attach here the first version of the code I wrote for astrophotography.
It contains the control of the camera, the control of a motor with GPIO (on a Pine64, it should work also on Raspberry PI if the gpios numbers are modified) that I use for the focuser and the integration with astrometry.net to solve the image, extract the coordinates and send them to a mount that uses the MEADE protocol.
Thanks. It's always nice to see people find a use for this stuff.

One comment
Code: [Select]
            self.camera.lua_execute('set_tv96_direct(usec_to_tv96('+shutter_time+'))')
            self.camera.lua_execute("""press('shoot_half')
                                  repeat
                                      sleep(10)
                                  until get_shooting()
                                  press("shoot_full")
                                  return""")
In the CHDK, script overrides are cleared between script invocations, and each PTP call is a separate script.  So in general, if you want to set overrides, you should do it in the same call that takes the shot. (It may work in your case if the camera is a mode where the camera firmware doesn't otherwise modify the Tv)
Don't forget what the H stands for.

Re: Re: eos M10 port
« Reply #2 on: 03 / April / 2018, 16:39:33 »
Thanks for the hint, I modified the script and included the shutter time in the same call.
I also add a warning box to inform that the script erases every pic and video from the camera at the startup.
This I do because too many time I wasted nights because the card was full, so I always erase it and transfert the images immediately on the computer after shoot, but it is better to inform who wants to test this code.

Re: Camera control for astrophotography (was Re: eos M10 port)
« Reply #3 on: 07 / June / 2018, 11:27:09 »
Thanks, after your suggestion I was able to use also the shoot_full function that is much better for my project (the shoot i seems bugged in chdkptp.py when the time is longer than 30 seconds on the M10).

I attach here the first version of the code I wrote for astrophotography.
It contains the control of the camera, the control of a motor with GPIO (on a Pine64, it should work also on Raspberry PI if the gpios numbers are modified) that I use for the focuser and the integration with astrometry.net to solve the image, extract the coordinates and send them to a mount that uses the MEADE protocol.

The code is not easily reusable (it is strongly adapted to my needs and I didn't put a decent error handling) but I am available to help someone else if he/she wants to run it.

What program do you use to control the camera ? Is it provided by the community or you coded it yourself ?


 

Related Topics