CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD - page 56 - Creative Uses of CHDK - CHDK Forum  

CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD

  • 704 Replies
  • 169248 Views
*

Offline srsa_4c

  • ******
  • 4451
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #550 on: 16 / August / 2013, 10:23:44 »
Advertisements
@SticK

Try this to experiment with liveview gain:

Execute the following commands once for the session:
Code: [Select]
=return call_event_proc("FA.Create")
=return call_event_proc("InitializeAdjustmentFunction")
Execute this once, when the liveview is 'bright' (are you always using the maximum ISO for live view?):
Code: [Select]
=return call_event_proc("GetCdsGainValue")
Note the returned value.

To restore liveview gain, execute the following:
Code: [Select]
=return call_event_proc("SetCdsGainValue",<insert noted gain value>)
If this method works for you, you'll need to replace the content of reset_ISO() with the direct equivalent of the SetCdsGainValue event procedure (details later, if the experiment turns out to be a success).

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #551 on: 16 / August / 2013, 14:06:42 »
@srsa_4c

** I'm uncertain about this, it's weird .. I think I have to repeat, later when I get back. **

After reinstalling V1.1, I tried your test on the 100c first.  It seems there it is not needed because the dimming problem does not occur, and I am not sure if it did in the distant past.  So I changed ISO and noted that "GetCdsGainValue" does change, as expected.  But

On the other hand, with 101a, no matter what I set Canon ISO to, using Canon SET ISO to the value is pegged at 649, and using "SetCdsGainValue" with 649 has no effect, the expected result.  However ....  if I use 100c's value of 208 to set the 101c, yes that goes dark.

Now going back to the 100c again, the behavior is like the 101a.  Hmmm.

Now 101a.  Canon ISO SET locked out?  There is this something else in this department being affected with Create it seems to me, I think like going into a different mode of ISO operation // not sure.  Ahhh, I see .. I can control the brightness by setting "SetCdsGainValue", but it's as though the range has shifted down, not sure, but now I can't use Canon SET menu to change ISO, no response there .. stays at the last "SetCdsGainValue".  Hmmm.

It seems that  once I do the Create, I have different, or no, response the Canon SET ISO menu .. Is that possible?

So it looks like you're trekking in the right area, we're close to something .. I have to repeat to get a better handle.   Can you provide more info on possible side-effects?

Quote
are you always using the maximum ISO for live view?
Good question.  That's one of the charms of this camera, is that it opens the possibility of looking at fluorescence live, and yes I hope to.  Low ISOs liveview will be used as in the existing instrument, for navigation.
« Last Edit: 16 / August / 2013, 14:08:33 by SticK »

*

Offline srsa_4c

  • ******
  • 4451
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #552 on: 16 / August / 2013, 14:58:00 »
I have to add that I only tried this on a camera that has no M mode.
The camera tries to maintain liveview brightness in (almost) all shooting modes (it adjusts gain and shutter speed / frame rate, maybe iris too, if it's available). They call this "continuous AE".
AFAIK this is not happening in M mode, liveview stays dark when the cam is instructed so.

On the a3200, the liveview gain set by SetCdsGainValue stays only as long until there's no significant change in the brightness of the scene . It also goes away after shooting.
There is are functions in the firmware which can disable and re-enable "continuous AE". Unfortunately these are no longer available as event procedures, one needs to use their - firmware version dependent - direct address. Can you check whether you need to use this in M mode?

It's indeed possible that SetCdsGainValue overrides the manual ISO control for live view - but I would expect that its effect vanishes after taking a shot.
« Last Edit: 16 / August / 2013, 15:19:44 by srsa_4c »

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #553 on: 16 / August / 2013, 20:45:04 »
I have to add that I only tried this on a camera that has no M mode.
Both my cameras are *always* tested in the M mode, because that is the final objective!  So I think you should be able to see it on your a3200, which has an M mode ??

Quote
The camera tries to maintain liveview brightness in (almost) all shooting modes (it adjusts gain and shutter speed / frame rate, maybe iris too, if it's available). They call this "continuous AE"
Yup I agree, that definitely will happen, but in the M mode, it's all user-controlled.  So you can't really do a good test where you are if you don't have M mode on your a3200.  Do you?

Quote
AFAIK this is not happening in M mode, liveview stays dark when the cam is instructed so.
Parser overload srsa, can you please be more specific?

Quote
Can you check whether you need to use this in M mode?
Yes, M mode is the only mode I operate in.

Quote
On the a3200, the liveview gain set by SetCdsGainValue stays only as long until there's no significant change in the brightness of the scene. It also goes away after shooting.
If this applies to AE, it's expected and you would not be able to simulate or test a fix.  In M, when you shoot normal Canon by pressing the big SHOOT button in CHDKPTP, (not reyalp shoot which overrides), then the liveview gain is unaffected by the shot.  So that part's OK.  It's only when you shoot with shoot lua call, that's when the problem occurs.  By the way, the "Cds" in SetCdsGainValue is CDS, or Correlated Double Sampler.  The CDS is actually the 1st stage in the analog pipeline out of the CCD that eliminates DC bias in the signal, and integrates the photoelectrons from each pixel well.  So that makes sense to me in that what Canon calls "CDS" in the camera (S90) is a complete single chip that in reality composed of 4 major elements: the CDS, the VGA, the ADC and CCD TIMING.  Hence this value alters the VGA (Variable Gain Amplifier), whether by your new call, or by me setting the ISO value in M mode.  The "CDS" CHIP in the S90 is based on the AD9920A (figure top panel, circled blue and analog pipeline, bottom panel).  I circled the VGA red.  It has a range of +6dB to +42dB gain in 1024 steps, ie via a digital register.  So those values that I am seeing here seem to makes sense too.

Quote
It's indeed possible that SetCdsGainValue overrides the manual ISO control for live view - but I would expect that its effect vanishes after taking a shot.
Now that I know you might ?not? have M mode on your a3200, I will redo these tests with much more rigor and give you better answers.  Please let me know if you cannot test on an M-mode DIGIC 4.
« Last Edit: 16 / August / 2013, 20:50:13 by SticK »


*

Offline reyalp

  • ******
  • 14080
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #554 on: 16 / August / 2013, 22:18:42 »
I don't remember if we tried before for the ISO issue, but have you tried setting the ISO_MODE propcase ?

On my a540, this is reflected in the live view brightness in M mode, but it only updates after a half press.

Note that if you only want to use the standard ISO values available in the canon firmware, you can use this to set the ISO rather than using ISO overrides.

This would be set with camera code like:
props=require'propcase';set_prop(props.ISO_MODE,<your ISO goes here>)
Don't forget what the H stands for.

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #555 on: 17 / August / 2013, 03:25:12 »
I don't remember if we tried before for the ISO issue, but have you tried setting the ISO_MODE propcase ?
Nope, we didn't try this at the time.  Your suggestion .props=require'propcase';set_prop(props.ISO_MODE,<your ISO goes here>) does have an interesting effect.  For example, booting afresh, if I set ISO via Canon so that the +/- 2 Ev intensity meter in the OSD is centered, and I send a value via your call here, the meter gets affected: I can move the meter up or down by this call.  However, liveview gain remains exactly the same.  So there must be two independent routes where ISO is handled, one for exposures and another for liveview.  srsa's mechanism seems to affect liveview only, the opposite of yours.  So I'd say he's closer, but I still need to do a thorough exploration of his mechanism.

Quote
On my a540, this is reflected in the live view brightness in M mode, but it only updates after a half press.
So I tried this on the S90_101a: .props=require'propcase';set_prop(props.ISO_MODE, iso);shoot_half(), and the liveview brightness still remains unaffected.  However, instead of shoot_half() if press the SHOOT HALF button in CHDKPTP, then yes, the liveview gain *does* get affected, so shoot_half() and the button behave differently.   But, the ISO value in the OSD icon does not change.  So I must be still missing something.  If this all worked perfectly via a script call after using Lua shoot and liveview brightness and icon remained the same after a shot, then it could an interesting solution too, because instead of using Canon SET route to change liveview brightness, I could program a series of push-buttons on the CHDKPTP panel to select from.  That certainly would be handy, but I have a sense it wouldn't work, or, something is still missing to update the icon.  Conceptually, SticK_shoot(Tv, Sv) could implement a workaround that is better than what I do now, similar to his suggestion:
   a) read the propcase before reyalp_shoot
   b) reyalp_shoot
   c) set the propcase back for liveview reset
... but I don't know how to do it so it's clean and complete to test it out.

Quote
Note that if you only want to use the standard ISO values available in the canon firmware, you can use this to set the ISO rather than using ISO overrides.
I like the way your shoot lua call works.  It does everything I need.  Hence without further exploring your new suggestion, my guess is somewhere in your shoot lua call you use this code to set ISO before activating the camera shutter.  Would I be on the right track?

edit:  one has to keep in mind that liveview brightness is also affected by changing the Tv on the OSD.  So maybe, just maybe, reading both Tv and Sv might be needed before doing a liveview brightness reset.
« Last Edit: 17 / August / 2013, 03:39:22 by SticK »

Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #556 on: 17 / August / 2013, 06:02:37 »
That's one of the charms of this camera, is that it opens the possibility of looking at fluorescence live

Congratulations on being able to spell fluorescence, the overwhelming majority of the World's population cannot, they spell it flourescence or florescence ?

Raman spectroscopy ?


*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #557 on: 17 / August / 2013, 06:24:32 »
Congratulations on being able to spell fluorescence, the overwhelming majority of the World's population cannot, they spell it flourescence or florescence ?
Thanks ... I am encouraged by the high quality of English on this forum overall, and I hope that folks pick up not only on the great technology that comes from here, but that too.

Quote
Raman spectroscopy ?
Yes that is one the architectural goals and its infrastructure is pending.  However, the focus of this project will remain with fluorescence, steady-state and lifetime analyses.  Both these infrastructures are fully functional.


*

Offline srsa_4c

  • ******
  • 4451
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #558 on: 17 / August / 2013, 07:41:18 »
Quote
AFAIK this is not happening in M mode, liveview stays dark when the cam is instructed so.
Parser overload srsa, can you please be more specific?
That was meant as an example, meaning the camera doesn't adjust liveview brightness automatically when in M mode - I assumed that there is no continuous AE in that mode.
Quote
Please let me know if you cannot test on an M-mode DIGIC 4.
None of my DIGIC 4 cameras have an M mode. Additionally, I tried this on my SX100 which does have M, and GetCdsGainValue seems to always return 0 ...

I think you should start exploring reyalp's solution, set the ISO propcase and drop the '-sv=' part of the shoot command.

Quote
But, the ISO value in the OSD icon does not change.
Keep in mind that the Canon UI may not reflect settings which you enter in an 'unexpected' way.

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #559 on: 17 / August / 2013, 10:11:30 »
None of my DIGIC 4 cameras have an M mode.
Inability to test in M makes your solutions even that more impressive.

Quote
Additionally, I tried this on my SX100 which does have M, and GetCdsGainValue seems to always return 0 ...I think you should start exploring reyalp's solution, set the ISO propcase and drop the '-sv=' part of the shoot command.
reyalp's proposal may surely be worth exploring.  However, the plan for today is to better understand yours first and give you some more formal feedback.

Quote
set the ISO propcase and drop the '-sv=' part of the shoot command.
I think this would affect my image.  Acquiring an image has to be independent of the liveview settings.  Let's see what I get.
« Last Edit: 17 / August / 2013, 10:30:03 by SticK »

 

Related Topics