Author Topic: Astrophotography module (astro.mo)  (Read 12639 times)

xaint

  • New to the forum
  • *
  • Posts: 46
Astrophotography module (astro.mo)
« on: January 02, 2017, 07:37:19 PM »
Hello!

I've made a module called astro a couple of years ago, which I never published because of three reasons.

1: the source code is messy
2: it has never been tested thoroughly
3: it stayed in a highly experimental state

But finding it on a VM a couple of years later, I thought it may worth to share (in spite of the fact that the reasons listed above still apply :) )
Someone may find it useful or may improve it, who knows. :)

You can find the source code at the bottom somewhere.






Basically it's got three functions, which can help you setting up your EQ mount for astrophotography:

- camera alignment (by drawing a horizontal line :), really)
- polar alignment (D.A.R.V. or Drift Alignment by Robert Vice)
- star focusing using the half flux diameter formula
- bonus: you can also change the color scheme to dark red

The basic idea comes from a video on youtube (link is below), where the guy uses a laptop, and a software called BackyardEOS to do the drift alignment & star focusing, but carrying around a laptop with all the other gear can be a bit how ya doin'. Since we already have a nice intervalometer built into magic lantern, I thought it would be nice to have everything built into the camera.

Here's the video:
https://youtu.be/zQB6UnrTEEM?list=PLdSieE6m2qgtXhHODxebbiRg5INaL5IpF&t=1693

In order to do the drift alignment, basically you'd have to burn a star’s trail into the image using a long exposure, which of course requires the shutter.

Using this module you don't have to release the shutter, it recognises the star (which is used for the alignment) at given points of the screen, then it draws some lines to show it’s path.

Something like this:









As you can see, the star arrived a bit above the starting point, so you need to do some adjustments...

(But doing it in BackyardEOS is more precise though, cause you have a high res picture which can be analyzed much better)



And to get an idea, here’s how the star focusing works:



Basically, the sharper the star is, the lower the HFD value and the higher the Max pixel value should be.

(by doing some quick tests I’ve noticed that sometimes the HFD value continues to go down even when we’re going out of focus  :-[)

As I’ve said, it was a highly experimental thing...
Maybe I could fix the bugs, if I had some spare time, or I could just share the source..

If you’re brave enough, you can give it a try, here’s the module, compiled using the latest build.
I’ve only tried it on a 550D so be aware. Oh and do it on your own risk! :D

550D only: astro.rar


Here's the independent module (no custom menu, no telescope icon):
You'll find the functions inside the Focus menu.
(According to the compiler: Will load on:  500D, 50D, 550D, 5D2, 5D3, 600D, 60D, 650D, 700D, 7D, EOSM)

Should run on "all" cameras: astro.mo
Never tested though...


You can find the source code here: source


What do you think? Share your opinion!

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1744
Re: Astrophotography module (astro.mo)
« Reply #1 on: January 02, 2017, 07:54:20 PM »
@xaint

Went to try it, but compiled against an older version of the API, so wont load with the latest nightly :-(

DeafEyeJedi

  • Hero Member
  • *****
  • Posts: 3196
  • 5D3 / M1 / 7D / 70D / SL1 / M2
Re: Astrophotography module (astro.mo)
« Reply #2 on: January 02, 2017, 07:58:05 PM »
Sick stuff @xaint and Thanks for holding this out over the years before sharing. Smart move!

Please make this capable with the latest API in order for us to test with the most recent builds.
5D3.113 • 5D3.123 • EOSM.203 • 7D.203 • 70D.112 • 100D.101 • EOSM2.*

domasa

  • Freshman
  • **
  • Posts: 88
Re: Astrophotography module (astro.mo)
« Reply #3 on: January 02, 2017, 08:24:57 PM »
It looks great. Thank you!

xaint

  • New to the forum
  • *
  • Posts: 46
Re: Astrophotography module (astro.mo)
« Reply #4 on: January 02, 2017, 10:31:50 PM »
Updated the link, forgot to add the autoexec.bin  ::) (550D only)
It should work now...

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1744
Re: Astrophotography module (astro.mo)
« Reply #5 on: January 02, 2017, 10:38:43 PM »
@xaint

Not happy with link. I get adware and all it does is download a .rar file.

SpcCb

  • Member
  • ***
  • Posts: 207
Re: Astrophotography module (astro.mo)
« Reply #6 on: January 03, 2017, 04:18:51 AM »
Nice xaint!

Maybe it will be interesting to share sources, to make versions for other camera models, test it, and also maybe to help in development.

For the FWHM algorithm, it's hard to get something relevant from the live view feed because of the debayering +/|| scaling (I tired without good results and a certain lack of knowledge to deal with the feed at 1:1 _in crop mode_ resolution). I'm interested by how do you manage that? :)
IMHO it's the most interesting feature because it's on the imaging device, and could be link with a robofocus to compensate the point between LP frames for example.

BBA

  • Member
  • ***
  • Posts: 125
Re: Astrophotography module (astro.mo)
« Reply #7 on: January 03, 2017, 03:52:29 PM »
Very nice piece of work! Thanks!

Would be very happy to see how you made it !! (take a picture and process it or ...)

I am very interested in ways to help to focus near infinity : last holidays I spent two nights near the Gornergrat observatory in the Swiss Alps. In the cold and dark, a little too humid weather... I did not very well with focussing on the milky way... Still trying to get something (somewhat beautiful, certainly not correct) from the timelapse pictures taken (deconvolutions, ....)  :P  ... because it's too late!

xaint

  • New to the forum
  • *
  • Posts: 46
Re: Astrophotography module (astro.mo)
« Reply #8 on: January 04, 2017, 10:29:34 PM »
The functions are in the Focus menu now, so maybe it'll work on other cameras.
(It worked for me with the latest nightly...)

Added the link above.

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1744
Re: Astrophotography module (astro.mo)
« Reply #9 on: January 04, 2017, 10:33:57 PM »
@xaint

Tried again, still get the ad link, but I downloaded the module.

On my 5D3 I get an error "No info structure found(addr 0x0).

:(

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1744
Re: Astrophotography module (astro.mo)
« Reply #10 on: January 27, 2017, 03:47:23 PM »
I'm using the latest ML builds (5D3) but can't use this module :-(

Could some kind person, who knows what there doing, update this module to run with the latest nighties :-)

Cheers

Garry

Walter Schulz

  • Contributor
  • Hero Member
  • *****
  • Posts: 6792
Re: Astrophotography module (astro.mo)
« Reply #11 on: January 27, 2017, 04:24:05 PM »
You tried 1.1.3, too?
Photogs and videographers: Assist in proof reading upcoming in-camera help!. Your input is wanted and needed!

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1744
Re: Astrophotography module (astro.mo)
« Reply #12 on: January 27, 2017, 04:42:06 PM »
I'm afraid I'm on 123 and need to stay there.

IBIRRU

  • New to the forum
  • *
  • Posts: 33
Re: Astrophotography module (astro.mo)
« Reply #13 on: January 28, 2017, 11:00:35 AM »
Nice works @xaint! Thanks a lot for share it :D

I normally use APT on Win PC for DARV but I'm often on the go, then it is nice to leave the PC at home.

It loads ok on 700D with the Latest nightly Build (2017-01-27 01:12)

It do not load on experimental magiclantern-manual_lens_info.2017Jan26.700D114 branch. It shows an "Old Api" "Wrong version (v6.0, expected 7.1) error
EOS 700D 1.1.5, EOS 500D

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Re: Astrophotography module (astro.mo)
« Reply #14 on: January 28, 2017, 04:53:52 PM »
Could some kind person, who knows what there doing, update this module to run with the latest nighties :-)
We could easily, but not until the author posts his source code (as required by the terms of the GPL).

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1744
Re: Astrophotography module (astro.mo)
« Reply #15 on: January 28, 2017, 05:29:38 PM »
@xaint

Any chance of answering dmilligan's 'hint'  ;)

Cheers

Garry

xaint

  • New to the forum
  • *
  • Posts: 46
Re: Astrophotography module (astro.mo)
« Reply #16 on: February 06, 2017, 11:05:12 AM »
We could easily, but not until the author posts his source code (as required by the terms of the GPL).


Hey @dmilligan, 'thanks' for remembering..

You can find the source code here: source

ItsMeLenny

  • Hero Member
  • *****
  • Posts: 923
  • 550D
Re: Astrophotography module (astro.mo)
« Reply #17 on: February 06, 2017, 12:40:08 PM »
(as required by the terms of the GPL).

Not to start this argument but; wouldn't the GPL only cover this if it was a modification to ML? As this is a separate module in would be under whatever licence the author chooses.

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Re: Astrophotography module (astro.mo)
« Reply #18 on: February 06, 2017, 01:11:17 PM »
At the very least, it's not possible to write a module without including GPL'd ML source code (such as header files).

matt_chun

  • Just arrived
  • *
  • Posts: 1
Re: Astrophotography module (astro.mo)
« Reply #19 on: August 24, 2017, 06:01:57 PM »
Does it work on 6D?

nashhen

  • Just arrived
  • *
  • Posts: 1
Re: Astrophotography module (astro.mo)
« Reply #20 on: September 30, 2017, 02:33:25 PM »
It works on my 6Da and ML nightly 2016Dec19.6D116

just copied from astro.rar the astro.mo to the sd card


[edit] tested the newest nightly build 2017Sep30.6D116, it loads astro modul, seems to be working, still no field test performed...

dareius

  • New to the forum
  • *
  • Posts: 6
Re: Astrophotography module (astro.mo)
« Reply #21 on: December 15, 2017, 10:05:29 PM »
Dear all,
this module does not work on 1100D with the latest firmware.
I got always these errors:

tcc: error undefined symbol 'raw_lv_request'
tcc: error undefined symbol 'raw_lv_release'
failed to link modules

How can fix this issue?
Best

cshell

  • New to the forum
  • *
  • Posts: 2
Re: Astrophotography module (astro.mo)
« Reply #22 on: December 31, 2017, 07:32:19 AM »
I would LOVE to have this, however the all cameras link did not work properly. Any where else I can pull the Astro module from?

Erik Krause

  • Freshman
  • **
  • Posts: 59
Re: Astrophotography module (astro.mo)
« Reply #23 on: May 13, 2018, 07:54:23 PM »
Why isn't astro.mo in the /modules folder on https://bitbucket.org/hudson/magic-lantern/src ?

g3gg0

  • Developer
  • Hero Member
  • *****
  • Posts: 3148
Re: Astrophotography module (astro.mo)
« Reply #24 on: May 14, 2018, 12:44:20 AM »
it is not part of the official ML repository.
guess there is no maintainer then who would keep it working whenever ML changed some internals.
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: paypal@g3gg0.de
ONLY donate for things we have done, not for things you expect!

waza57

  • New to the forum
  • *
  • Posts: 40
Re: Astrophotography module (astro.mo)
« Reply #25 on: May 22, 2018, 01:15:02 AM »
@xaint

Tried again, still get the ad link, but I downloaded the module.

On my 5D3 I get an error "No info structure found(addr 0x0).

:(

   

You must try:
the name of module all in lowercase
report it in Makefile.modules.default

Code: [Select]
hg add astro.c then  :
Code: [Select]
hg commit -m "your message info" After this you can try to compile the module

cshell

  • New to the forum
  • *
  • Posts: 2
Re: Astrophotography module (astro.mo)
« Reply #26 on: June 01, 2018, 08:02:06 AM »
I finally got this working. Seems that my other computer had some type of protection on it not allowing the download. I’ve tested it on the last 2 builds for the 7D and plan to do the latest tonight. All I can say is thank u so much! I think it’s great!

IBIRRU

  • New to the forum
  • *
  • Posts: 33
Re: Astrophotography module (astro.mo)
« Reply #27 on: September 20, 2018, 03:13:11 PM »
@xaint
any chance to have an updated (working with actual ML builds) version of this module?  :)

Thanks
EOS 700D 1.1.5, EOS 500D

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12258
  • Emergencies only
Re: Astrophotography module (astro.mo)
« Reply #28 on: September 20, 2018, 04:10:55 PM »
Actually I see the problem a bit in a slightly different direction: updating the main builds to the new backend, i.e. merging the lua_fix branch, but I need some help with testing.

Then, this module (and all others) should work in both main builds and experimental ones, i.e. you should be able to freely swap modules around.

Still need to sit down and take a closer look at this module; sorry for the delay.

darlock

  • New to the forum
  • *
  • Posts: 2
Re: Astrophotography module (astro.mo)
« Reply #29 on: December 26, 2018, 04:40:47 PM »
Very usefull module for 6d. 6d sensor had really low noise level.
Is it possible to include it to release pack?

Is it possible to transfer some  data from canon to external device via serial protocol?

tignasse

  • Just arrived
  • *
  • Posts: 1
Re: Astrophotography module (astro.mo)
« Reply #30 on: January 04, 2019, 08:44:58 PM »
It works on my 6Da and ML nightly 2016Dec19.6D116

just copied from astro.rar the astro.mo to the sd card


[edit] tested the newest nightly build 2017Sep30.6D116, it loads astro modul, seems to be working, still no field test performed...


Hi,yes it works with 6D 1.1.6 with the last nightly build ,but the LV gain must be on 0 EV...

02keilj

  • Just arrived
  • *
  • Posts: 1
Re: Astrophotography module (astro.mo)
« Reply #31 on: January 09, 2019, 12:51:26 AM »
Man I am so glad I decided to jump on the forums this morning. I am just about to head off camping and will be hiking up to a nice secluded area with 360 degree views for some astrophotography. I also just did a few modifications to my telescope EQ2 mount with motor drive so I can mount my DSLR.

I have installed the module on my 6D and it appears to have loaded correct so I will give it a bit of a go the next few nights (clear skies permitted) and report back with any successes/issues.



dansawyeror

  • New to the forum
  • *
  • Posts: 2
Re: Astrophotography module (astro.mo)
« Reply #32 on: April 03, 2019, 02:44:16 PM »
I would like to try this module on my M1, however I cannot download the source. Does anyone know where the source may be downloaded?

Walter Schulz

  • Contributor
  • Hero Member
  • *****
  • Posts: 6792
Re: Astrophotography module (astro.mo)
« Reply #33 on: April 03, 2019, 02:52:35 PM »
No trouble here downloading from the location linked in first posting.
Photogs and videographers: Assist in proof reading upcoming in-camera help!. Your input is wanted and needed!

scrax

  • Contributor
  • Hero Member
  • *****
  • Posts: 1543
  • Code monkey
Re: Astrophotography module (astro.mo)
« Reply #34 on: April 03, 2019, 08:38:38 PM »
I didn't noticed this module, seems interesting but there is only the code for the module, what is different in the 550D version? I suppose icons should be in ML code
I'm using ML2.3 for photography with:
EOS 600DML | EOS 400Dplus | EOS 5D MLbeta5- EF 100mm f/2.8 USM Macro  - EF-S 17-85mm f4-5.6 IS USM - EF 70-200mm f/4 L USM - 580EXII - OsX, PS, LR, RawTherapee, LightZone -no video experience-

IBIRRU

  • New to the forum
  • *
  • Posts: 33
Re: Astrophotography module (astro.mo)
« Reply #35 on: July 05, 2019, 01:29:23 PM »
There is a goog guy able to re-compile the module for Danne "crop_rec_4k_mlv_snd_isogain_1x3_presets_2019Apr02.700D115"?

Thanks  :)
EOS 700D 1.1.5, EOS 500D

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3721
Re: Astrophotography module (astro.mo)
« Reply #36 on: July 06, 2019, 03:43:42 AM »
There is a goog guy able to re-compile...

I'm a goog guy. Check out my downloads page.

Didn't have a chance to play around with it very much but l like the feature that turns the menus red. Doesn't work that great on the EOSM because the screen keeps refreshing. Turn on the module and navigate to the ML/Focus menu to see the new options.


(Wait 30 minutes for your eyes to get used to the dark.  :P )

What I did was copy the source to a new branch -- branched off of lua_fix so it should compile for most cameras. Then I added the module to Danne's latest compiled for the 700D. Haven't played around with that much either. The module should work on other branches and maybe other cameras. IDK -- give it a try and have fun with it.

Would have been nice to discover this sooner. I recently went to Death Valley to see the Milky Way. This is what it looked like from Dante's View:



That isn't the sunset on the horizon, it is the lights from Los Angeles. The lights from Las Vegas are even brighter there.
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

IBIRRU

  • New to the forum
  • *
  • Posts: 33
Re: Astrophotography module (astro.mo)
« Reply #37 on: July 11, 2019, 08:18:48 PM »
 :) :) Yes! You are a good guy! And all people involved in ML project are good guy!

Thanks a lot DFort.
I've just downloaded and installed, it seems to works without any problem.

I will play around next weekend (if not cloudy :-[)

Your picture is fantastic 

I'm trying to reduce all hardware to minimum and this module could be useful (I hope)
EOS 700D 1.1.5, EOS 500D

dansawyer

  • New to the forum
  • *
  • Posts: 8
Re: Astrophotography module (astro.mo)
« Reply #38 on: July 26, 2019, 03:48:35 AM »
Attempts to compile the source result in:
../../src/module.h:344:28: fatal error: module_strings.h: No such file or directory
Is there a resolution to this error?
Is there an alternate source for this library?
There is library strings.h. Is this equivalent?

This was resolved by loading python docutils and adding the following to the path:

PATH=$PATH:/home/extended/downloads/gcc-arm-none-eabi-6-2017-q2-update/bin/


dansawyer

  • New to the forum
  • *
  • Posts: 8
Re: Astrophotography module (astro.mo)
« Reply #39 on: July 26, 2019, 05:03:09 PM »
This may be redundant. After reading the thread carefully there is a July branch uploaded. It says to download with:
hg pull && hg update astro_photography_module
However this generates an error: abort: no repository found in '/home/dan/downloads' (.hg not found)!
How can hg be configured to identify the magic lantern repository?
Is there a way to download the branch w/o using hg?

Follow on: I copied the files with cut and paste :( then removed the leading + with sed and compiled. (yes the kluge award for the day )

Is this error significant:

Not checked (compile ML for these cameras first):
    1100D, 500D, 50D, 550D, 5D2, 5D3.113, 5D3.123, 600D, 60D, 650D, 6D, 700D, 7D, EOSM
make: *** [../Makefile.modules:82: astro.dep] Error 1

I am using an EOSM version 2.02



dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3721
Re: Astrophotography module (astro.mo)
« Reply #40 on: July 26, 2019, 10:11:43 PM »
Is there a way to download the branch w/o using hg?

Follow on: I copied the files with cut and paste :( then removed the leading + with sed and compiled. (yes the kluge award for the day )

Huh? Why not learn the basics of hg and do it the right way?

Though you can download the original source for the module by going here and clicking on the "Download repository" link:

https://bitbucket.org/xaint/magic-lantern-astro-module/downloads/

Put the module in the lua_fix branch, compile it and Bob's your uncle. Note that if you're using the EOSM the dark red feature doesn't work that great because ML keeps refreshing the screen.

If you want to take it from my repository:

Code: [Select]
hg clone https://bitbucket.org/daniel_fort/magic-lantern
cd magic-lantern
hg update astro_photography_module

# optional if you want to speed up compiling
export MAKEFLAGS='-j8'

cd platform/EOSM.202

# assuming you have an ML development environment setup, choose whatever method you prefer:

make zip
# or to copy ML onto an SD card mounted on your computer:
make install
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

dansawyer

  • New to the forum
  • *
  • Posts: 8
Re: Astrophotography module (astro.mo)
« Reply #41 on: July 26, 2019, 11:13:46 PM »
Quick update:
First thank you for the build chain. That worked smoothly and produced a zip w/o errors.
The zip file was unziped and the files copied to the SD card from an EOS M, firmware version 2.02.
The files copied were: autoexec.bin  and ML-SETUP.FIR. The ML directory was also copied.
The SD card was moved to the camera and the firmware was reloaded. The instructions were followed.
Module info showed the build time and system consistent with the build. This is reasonable confirmation the build and firmware load process worked.

One quick observation, when the color scheme is set to red the display flashes periodically to normal.

dansawyer

  • New to the forum
  • *
  • Posts: 8
Re: Astrophotography module (astro.mo)
« Reply #42 on: August 02, 2019, 09:32:11 PM »
Use of astro.mo
I was able to compile and install astro.mo. Last night I tried to test it and have a couple of general questions.
First, it generally worked. I was using a an EOSM and a 90 mm fl f4 lens. This may be short for the module design target, but I believe the fl should not matter significantly. The issue above of the red background oscillating in and out did not occur in actual use, only in the menu screen.
First, the number of visible stars was very limited in the display. I was aiming generally West and chose Vega around 3 AM. Other stars did not show up in the field. Is this the general experience or on there something I am missing? Should I use EV display amplification? Will that distort the operation by creating noise?
Second, the actual focus display seemed to vary quite a bit on its own. That is the min bar would move to null then up several bars, then back down. This variation seemed to be on the same order of magnitude as changes in focus. Is this normal? Is there an error in my testing? Is this the result of a relatively short fl lens. 
I am looking forward to testing this on my Celestron 9.25.