Astrophotography module (astro.mo)

Started by xaint, January 02, 2017, 07:37:19 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

xaint

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

@xaint

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

DeafEyeJedi

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.* | 50D.109

domasa


xaint

Updated the link, forgot to add the autoexec.bin  ::) (550D only)
It should work now...

garry23

@xaint

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

SpcCb

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

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

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

@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

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


garry23

I'm afraid I'm on 123 and need to stay there.

IBIRRU

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

Quote from: garry23 on January 27, 2017, 03:47:23 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

@xaint

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

Cheers

Garry

xaint

Quote from: dmilligan on January 28, 2017, 04:53:52 PM
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

Quote from: dmilligan on January 28, 2017, 04:53:52 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

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


nashhen

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

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

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?


g3gg0

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: [email protected]
ONLY donate for things we have done, not for things you expect!

waza57

Quote from: garry23 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).

:(

   

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

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

cshell

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

@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

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

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

Quote from: nashhen 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...


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

02keilj

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

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

No trouble here downloading from the location linked in first posting.

scrax

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

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

Quote from: IBIRRU on July 05, 2019, 01:29:23 PM
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.

IBIRRU

 :) :) 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

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

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

Quote from: dansawyer on July 26, 2019, 05:03:09 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:

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

dansawyer

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

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.

csg2

Quote from: dansawyer 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.

Hi dan,

I have been doing moon photography with a 550d. I find when doing alignment for my GoTo mount with live view, the stars are faint and I have to crank up the exposure time and ISO to see an image there. If you are doing long exposures, the live view will not be a good indicator of the final result. Also keeping the live view on drains the battery and heats up the sensor. Heating up the sensor introduces more noise into the final image. What I do is crank up for the alignment phase, and then adjust exposure for my final target. I usually take pics of the moon and so the exposure is not too tricky. If you want to take pics of stars, constellations and so on, I suggest you seek advice over on cloudynights.com or another amateur astronomy forum.

I haven't got a clue about the other issue.