CHDK AstroKam Support - page 4 - Creative Uses of CHDK - CHDK Forum
supplierdeeply

CHDK AstroKam Support

  • 90 Replies
  • 26782 Views
*

Offline Davo

  • ***
  • 183
Re: CHDK AstroKam Support
« Reply #30 on: 26 / June / 2014, 09:00:36 »
Advertisements
AstroKam uses the excellent CHDKPTPRemote.NET for camera operations and this is an internal error from it which could occur in 2 places

Code: [Select]
        private Bitmap GetLiveImage(bool set_active_area, ref Rectangle active_area, Bitmap old_img)
        {
            if (old_img != null)
            {
                if (old_img.PixelFormat != System.Drawing.Imaging.PixelFormat.Format24bppRgb)
                {
                    throw new Exception("cannot reuse Bitmap: PixelFormat is not Format24bppRgb");
                }
                if (old_img.Width != vp_max_width || old_img.Height != vp_max_height)
                {
                    throw new Exception("cannot reuse Bitmap; dimensions are incorrect");
                }
            }

and

Code: [Select]
        public Bitmap GetLiveOverlay(Bitmap old_img = null)
        {
            if (old_img != null)
            {
                if (old_img.PixelFormat != System.Drawing.Imaging.PixelFormat.Format32bppArgb)
                {
                    throw new Exception("cannot reuse Bitmap: PixelFormat is not Format32bppArgb");
                }
                if (old_img.Width != bm_max_width || old_img.Height != bm_max_height)
                {
                    throw new Exception("cannot reuse Bitmap; dimensions are incorrect");
                }
            }

I will PM the coders and ask why this error would occur.

Dithering would be easy to add. How many pixels would you want to move between shots. Out of interest, what is the angular size of each pixel for your setup compared with the pointing and tracking accuracy of your mount?

Re: CHDK AstroKam Support
« Reply #31 on: 26 / June / 2014, 14:34:01 »
The code I wrote was made under certain assumptions. These were valid for the cameras that it was used with at that time. However, as became clear in discussions with reyalp (iirc), things are a bit more complicated in some cases.

At the moment, I'm not in a position to test code (nor do I have a suitable camera). Fixing it could be as simple as removing the specific throws with a 'old_img = null;' and making sure the drawing part in your application can handle the change in dimensions. This will result in the creating of a new bitmap object every time the camera switches. If that is a problem, one could look into keeping a mapping of dimensions to bitmaps, so you only have to create each one once.

Hope this helps. :)

*

Offline mngc

  • ***
  • 113
  • a590is fw 1.0.1b & sx110is fw 1.0b
Re: CHDK AstroKam Support
« Reply #32 on: 26 / June / 2014, 14:54:14 »
My mount ponting (GOTO) accuracy 6 arcmin. Tracking error with good polar aligment (periodic error) +-15 arcsec without guiding. With autoguiding small amount error remain (0,5-2 arcsec). SX110 camera has 10x optical zoom.  Maximal zoom not used, average zoom = 6 arcsec/ pixel resolution. Final resolution better. Some pixels dirthering required on final image. Guiding speeds 0.125, 0.5, 0.5, 1x sideral rate support on my mount. I use guider scope with cheap webcam with netbook.

I not know, astromkam support external autuguider or has own? Freeware autoguider available with dirthering support with external camera control software (phd guiding2, metaguide, ...). Guide important, periodic error too high. Some, not chdk compatible camera control software has function to send dirthering info for external autoguide program.

I have second camera (a590) with chdk. Not tested with astrokam. This camera small, good for digiscoping with large telescope. Digiscoping adapter not completed yet. This setup has a very high resolution, but seeing limited.

*

Offline reyalp

  • ******
  • 13456
Re: CHDK AstroKam Support
« Reply #33 on: 27 / June / 2014, 01:58:32 »
The code I wrote was made under certain assumptions. These were valid for the cameras that it was used with at that time. However, as became clear in discussions with reyalp (iirc), things are a bit more complicated in some cases.
Yes, clients need to be prepared for the viewport dimensions to change at any time. It shouldn't happen super often, generally it would be caused by play/rec switches, shooting mode changes, or digital zoom changes.
Don't forget what the H stands for.


*

Offline Davo

  • ***
  • 183
Re: CHDK AstroKam Support
« Reply #34 on: 28 / June / 2014, 06:48:33 »
The code I wrote was made under certain assumptions. These were valid for the cameras that it was used with at that time. However, as became clear in discussions with reyalp (iirc), things are a bit more complicated in some cases.
Yes, clients need to be prepared for the viewport dimensions to change at any time. It shouldn't happen super often, generally it would be caused by play/rec switches, shooting mode changes, or digital zoom changes.

Thanks guys - I will look at the code and see whether I can remove these errors. One thing that worries me is that I could end up with a version of CHDKPTPRemote.NET that works for AstroKam but is not accessible for other developers. Any thoughts on how we could avoid that and make CHDKPTPRemote.NET available to the group?

*

Offline Davo

  • ***
  • 183
Re: CHDK AstroKam Support
« Reply #35 on: 28 / June / 2014, 06:57:22 »
My mount ponting (GOTO) accuracy 6 arcmin. Tracking error with good polar aligment (periodic error) +-15 arcsec without guiding. With autoguiding small amount error remain (0,5-2 arcsec). SX110 camera has 10x optical zoom.  Maximal zoom not used, average zoom = 6 arcsec/ pixel resolution. Final resolution better. Some pixels dirthering required on final image. Guiding speeds 0.125, 0.5, 0.5, 1x sideral rate support on my mount. I use guider scope with cheap webcam with netbook.

I not know, astromkam support external autuguider or has own? Freeware autoguider available with dirthering support with external camera control software (phd guiding2, metaguide, ...). Guide important, periodic error too high. Some, not chdk compatible camera control software has function to send dirthering info for external autoguide program.

I have second camera (a590) with chdk. Not tested with astrokam. This camera small, good for digiscoping with large telescope. Digiscoping adapter not completed yet. This setup has a very high resolution, but seeing limited.

AstroKam does not have an autoguider but I have written commercial autoguiders for video cameras. I don't think you could autoguide and capture with a Canon if that is what you are asking. Better to use PHD on a separate video camera. However, you would need to manually shut down and restart PHD between each AstroKam target sequence. PHD would also interfere with any new dithering routine.

I am still looking into the problem with your big camera. Maybe you could try out AstroKam on the A590 for some widefield starshots to get you started?

*

Offline mngc

  • ***
  • 113
  • a590is fw 1.0.1b & sx110is fw 1.0b
Re: CHDK AstroKam Support
« Reply #36 on: 29 / June / 2014, 12:41:23 »
Thanks a lot you guys....

We are preparing for amateur astronomy camp. I am planning to test with the A590. It is getting modified for digiscoping right now, so testing will be possible a little later. I didn't plan to autoguide with the Canon. I would need to programs that would communicate with each other. The master program is AstroKam that is taking the shots. The slave program would be either PHD guiding or Metaguide. Astrokam would take a shot then it would send dithering info to the slave program and then take a new shot. If the programs don't communicate with each other then the outcome will be lots of bad shots because the telescope would dither during the shot.

I have a test script that I wrote that is running on the camera I used that for test shots but your method is much better. I can not connect my program to the dithering. I will upload my script later.

My test shots are not too good because the mount is faulty and we are working on it to fix the problem.

*

Offline blackhole

  • *****
  • 844
  • A590IS 101b
    • Planetary astrophotography
Re: CHDK AstroKam Support
« Reply #37 on: 29 / June / 2014, 16:46:59 »
Quote
I have a test script that I wrote that is running on the camera I used that for test shots but your method is much better. I can not connect my program to the dithering. I will upload my script later.
Probably the best script for astrophotography is here.


*

Offline Davo

  • ***
  • 183
Re: CHDK AstroKam Support
« Reply #38 on: 30 / June / 2014, 07:26:19 »
I didn't plan to autoguide with the Canon. I would need to programs that would communicate with each other. The master program is AstroKam that is taking the shots. The slave program would be either PHD guiding or Metaguide. Astrokam would take a shot then it would send dithering info to the slave program and then take a new shot. If the programs don't communicate with each other then the outcome will be lots of bad shots because the telescope would dither during the shot.

I understand now what you want and I think it is achievable. openPHD allows itself to be controlled by other software and it already has a dithering function built in. It also has an automatic guide star selector. This means I could set up AstroKam to take a shot, then send a dither command and take the next shot once the dither has settled. The auto star selector would also mean that guiding would restart automatically after moving to the next target object. AstroKam would then be a deep sky capture app with automatic guiding built in. Thanks for this great idea.

Let me investigate further and see how best to achieve this.

*

Offline mngc

  • ***
  • 113
  • a590is fw 1.0.1b & sx110is fw 1.0b
Re: CHDK AstroKam Support
« Reply #39 on: 01 / July / 2014, 15:22:27 »
Probably the best script for astrophotography is here.

Thank you for the tip, this script is really good, if you don't use a PC or ac power not available. I will test it.

On the other hand AstroKam is great with a PC and it has lots of special functions for example liveview.

My test script:
http://chdk.setepontos.com/index.php?topic=2838.msg114057#msg114057

 

Related Topics