Author Topic: Image Acquisition in PixInsight (Was: When will Pixinsight...)  (Read 78792 times)

Offline David Raphael

  • PixInsight Addict
  • ***
  • Posts: 226
    • Astrofactors CCD Cameras
Re: When will Pixinsight....
« Reply #30 on: 2011 January 12 19:04:32 »
Thanks for the feedback.  I think I am going to implement a dynamic interface for the preview mode.  That way you can tweak things while you take repeated exposures etc...

I have already coded the Settings as a separate process.  It will all be part of the ImageAcquisition module.  ExposeImage will be a process as well...as will guiding etc...

As soon as I have something to share I will let you guys know!

Cheers,
Dave
David Raphael

Offline JGMoreau

  • PixInsight Addict
  • ***
  • Posts: 131
Re: When will Pixinsight....
« Reply #31 on: 2011 January 16 12:48:59 »
Cool Dave 8)

..and please include dithering in the guiding part.

JG Moreau

Offline David Raphael

  • PixInsight Addict
  • ***
  • Posts: 226
    • Astrofactors CCD Cameras
Re: When will Pixinsight....
« Reply #32 on: 2011 January 16 18:17:47 »


I will definitely keep dithering on the list of TODOs when I attack the guider part...

Cheers,
Dave
David Raphael

Offline vicent_peris

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 988
    • http://www.astrofoto.es/
Re: When will Pixinsight....
« Reply #33 on: 2011 January 17 02:26:36 »


I will definitely keep dithering on the list of TODOs when I attack the guider part...

Cheers,
Dave

Please, could you put dithering without autoguider??


V.

Offline David Raphael

  • PixInsight Addict
  • ***
  • Posts: 226
    • Astrofactors CCD Cameras
Re: When will Pixinsight....
« Reply #34 on: 2011 January 20 18:55:30 »
Just a preview of the interface so far...it is definitely not a final draft by any means ;-)

David Raphael

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: When will Pixinsight....
« Reply #35 on: 2011 January 20 21:25:12 »
You may organize it better grouping the subframe NumericControls inside one GroupBox, titled Subframe ;)
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: When will Pixinsight....
« Reply #36 on: 2011 January 21 04:31:27 »
Extremely nice work, David!

That layout needs more spacing between items of vertical sizers. The standard is 4 pixels:

VerticalSizer v;
v.SetSpacing( 4 );
v.Add( FooControl );
v.Add( BarControl );
...


Don't be surprised if the actual spacing of items on the screen is slightly different (usually, somewhat larger). Unless you call explicitly:

Sizer s;
s.DisableAutoScaling();


PI automatically adjusts the final layout in a platform-dependent fashion.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Simon Hicks

  • PixInsight Old Hand
  • ****
  • Posts: 333
Re: When will Pixinsight....
« Reply #37 on: 2011 January 21 04:51:02 »
Hi David,

Very impressed that this is all happening, a great effort and a big vision.

Some thoughts;
1. DSLRs would benefit from having a box to specify a mirror lock up time.
2. It would be good to have a readout somewhere that tells me what image number I am on, and how long till that particular exposure finishes.
3. I assume that the idea is that after each single exposure is taken, it is automatically downloaded and displayed with STF enabled and maybe a histogram readout and maybe some statistics displayed as well? That would be cool.
4. If the above was set up then it would be good to be able to track a few statistics graphically during the exposure sequence, like background level, FWHM etc.

Just some thoughts that you've probably already had.  8)

Cheers
         Simon

Offline Emanuele

  • PixInsight Addict
  • ***
  • Posts: 270
Re: When will Pixinsight....
« Reply #38 on: 2011 January 21 04:56:05 »
Just a preview of the interface so far...it is definitely not a final draft by any means ;-)




Wonderful work David! :)

Offline David Raphael

  • PixInsight Addict
  • ***
  • Posts: 226
    • Astrofactors CCD Cameras
Re: When will Pixinsight....
« Reply #39 on: 2011 January 21 05:20:57 »
Thanks everyone for the feedback.

Keep bringing the ideas!  It is so much easier to say "No" to a request than for me to guess what everyone wants  >:D

Simon -
1.  Regarding the DSLR support - I don't have a DSLR at the moment...but the particular feature you are talking about will be handled in the ImageAcquisitionSettings process.  It is a separate window for configuring cameras and their settings.  Every driver can add specific settings here.  However, I am glad you pointed this particular one out because it potentially may need to have some functionality exposed in the standard PixInsight driver architecture.

2.  I was thinking the same thing about the progress meter last night.  I will give it some thought, I want to make sure we "fit" nicely into the PixInsight paradigms...but I definitely think that this is a fairly different use case than most of the modules as well.  I may incorporate a progress bar for the current image being taken.  For the rest of the statistics, I think we can add those incrementally for sure.   

3.  More or less this is what I am thinking ;-)

4.  Yes - this would be pretty easy I think...and this is one of the reasons I think PixInsight can absolutely be the best app for this!


Juan -
I will add those as suggested...

Carlos -
Will do!

Emanuele -
Thanks for starting this thread ;-)
David Raphael

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: When will Pixinsight....
« Reply #40 on: 2011 January 21 07:38:45 »
David,

Quote
I may incorporate a progress bar for the current image being taken.

With the appropriate configuration of threads, you can provide feedback asynchronously on the same process interface that you use to capture the images. The feedback mechanism can be as simple as a progress bar, or more sophisticated including a text log on a console embedded within your interface. Once you have it running, we can refine it later in numerous ways.

Basically, you need two elements working cooperatively:

- A thread that controls image acquisition. This thread provides two items for communication with the main thread (the main thread is the thread from which PI has started your module):

* A progress indicator. This can be an integer running from 0 to 100.
* A way to cancel the acquisition process. This is typically implemented as a global Boolean variable.

The only precaution is that all accesses to shared global variables must be protected with Mutex objects.

- A loop that watches the acquisition thread until it finishes, or if the user clicks a Cancel button, then it sets the corresponding global Boolean variable to true and waits until the acquisition thread terminates. This loop runs in the main thread. Note that only the main thread can perform GUI operations, so this thread is also responsible for providing user feedback such as a progress bar, and for capturing click events on a Cancel button, etc.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline RBA

  • PixInsight Guru
  • ****
  • Posts: 511
    • DeepSkyColors
Re: When will Pixinsight....
« Reply #41 on: 2011 January 21 07:41:06 »
May I suggest moving this topic to maybe the PCL and PJSR Development area?
It doesn't bother me here but I do think it deserves its own thread ;)

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: When will Pixinsight....
« Reply #42 on: 2011 January 21 07:43:28 »
Good point, Rogelio. I'm going to become 'Pleiades' right now to move the entire thread as a sticky in the development board.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline David Raphael

  • PixInsight Addict
  • ***
  • Posts: 226
    • Astrofactors CCD Cameras
Re: Image Acquisition in PixInsight (Was: When will Pixinsight...)
« Reply #43 on: 2011 January 21 08:00:35 »
Quote from: Juan Conejero
The only precaution is that all accesses to shared global variables must be protected with Mutex objects.

Got it.  I will look through the source code of the other modules to see examples...I believe I've seen some Synchronize() calls scattered about...

Thanks for moving the thread!

/d
David Raphael

Offline David Raphael

  • PixInsight Addict
  • ***
  • Posts: 226
    • Astrofactors CCD Cameras
Re: Image Acquisition in PixInsight (Was: When will Pixinsight...)
« Reply #44 on: 2011 January 22 12:31:15 »
Couple of Questions:

When do destructors get invoked on the Process classes?  Is it only when PixInsight closes?  Is there anywhere describing the full lifecycle of the Module / Process?

How can I serialize data from a PixInsight Array<T, A>  Class?  I'm sure I can do it manually, but I figured there has to be something built in since you are marshaling objects with their instance data...

...

I keep modifying this post because I am stuck on something I think:

I want to access data in my ImageAcquisitionSettings Process from my ExposeImage Process.  But I am not sure how I want to do this exactly.  I thought about serializing the settings data...I thought about adding some static members...but I think I am missing something a bit more fundamental.  Let me describe the use case:

1.  I start PixInsight
2.  I double click the ImageAcquisitionSettings process
3.  I setup a camera or 2 in the list
4.  I close the ImageAcquisitionSettings interface
5.  I launch the ExposeImage process

At this point, I want the ExposeImage process to be able to pull the camera data from the ImageAcquisitionSettings process.  I know there is only one instance of it (or at least that's what it seems like) - I'd like to be able to access that instance.  At the same time, I feel like I may be fighting PixInsight a little bit - I might be trying to violate some encapsulation principles...

Anyone?

Dave
« Last Edit: 2011 January 22 19:12:47 by David Raphael »
David Raphael