Yet Another Sunset Script (yass) v4.5 - page 3 - LUA Scripting - CHDK Forum
supplierdeeply

Yet Another Sunset Script (yass) v4.5

  • 166 Replies
  • 57153 Views
Re: Yet Another Sunset Script (yass) v4.1
« Reply #20 on: 04 / September / 2013, 04:36:13 »
Advertisements

Off the top of my head, one possibility is that you are trying to take pictures faster than the lowest shutter speed allows - i.e. shot rate faster than 20 seconds/shot (unless you have dark frame subtraction turned off in the Canon menus - that adds another ten seconds per exposure).  I'll have to check whether the shoot() function waits until the shot is completed and stored on the SD card with dark frame subtraction completed too.

What did you set the shot rate parameter to?


You may be right, that I was trying to take the shots too quickly... I set the shot rate to every 15 seconds... When I can, I'm going to try again at 30 seconds and update this post with the results.

Thanks,
David

Re: Yet Another Sunset Script (yass) v4.1
« Reply #21 on: 04 / September / 2013, 08:17:29 »
You may be right, that I was trying to take the shots too quickly... I set the shot rate to every 15 seconds... When I can, I'm going to try again at 30 seconds and update this post with the results.
I'll do some testing too.  If its an actual problem with trying to set the exposure for the next shot prior to the current shot completing, there are ways to detect that and get around it.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Yet Another Sunset Script (yass) v4.1
« Reply #22 on: 04 / September / 2013, 14:40:45 »
So, I took another try this morning with 30 seconds between shots (and 10 sec. max exposure) and got the same signature.

Attached is the latest log (which looks basically the same).

Re: Yet Another Sunset Script (yass) v4.1
« Reply #23 on: 04 / September / 2013, 20:13:31 »
So, I took another try this morning with 30 seconds between shots (and 10 sec. max exposure) and got the same signature.

Attached is the latest log (which looks basically the same).
Very weird.   What the log says is that the camera is told to take a 10 second exposure but it shoots for only 1 second  (and with and with a  different ISO value than specified) for some of the shots when the scene is very dark.

I guess the next thing would be to try it on a couple of my cameras and see if I can spot anything.
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline lapser

  • *****
  • 1093
Re: Yet Another Sunset Script (yass) v4.1
« Reply #24 on: 04 / September / 2013, 20:25:14 »
So, I took another try this morning with 30 seconds between shots (and 10 sec. max exposure) and got the same signature.

Attached is the latest log (which looks basically the same).
I discovered that the built in camera meter doesn't work very well at low light. Your log shows that the bv96 bottomed out at -881 and the next value is -841, a very noticeable change if you use it for exposure. In addition, it takes a longer time to compute the bv value in low light. Try pressing the shutter button half way in P mode with the camera lens covered and you'll see that it takes around 1 second to come back with an exposure.

Also, a better way to set exposure before the shot is to use press("shoot_half") to read the meter, compute the exposure, and then use propcases to set the tv96 and sv96. Then press("shoot_full") to take the shot and release the shutter.

As for the incorrect exposure, it sounds like the overrides that you're setting are being cleared, and the camera is using its own computed exposure in shoot(). I'm not sure that's it, but I don't think it would be a problem with the propcase method of setting exposure in half shoot.

I added a "when()" function to my CHDK patches that lets you set exposure immediately in half_shoot with the standard functions. This eliminates the need for propcases. It might be a useful addition to CHDK if we can show it works with all cameras.
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

Re: Yet Another Sunset Script (yass) v4.1
« Reply #25 on: 04 / September / 2013, 21:43:24 »
I discovered that the built in camera meter doesn't work very well at low light. Your log shows that the bv96 bottomed out at -881 and the next value is -841, a very noticeable change if you use it for exposure. In addition, it takes a longer time to compute the bv value in low light. Try pressing the shutter button half way in P mode with the camera lens covered and you'll see that it takes around 1 second to come back with an exposure.
In this case,  the Bv value is so low that the script simply locks the Tv at the minimum setpoint and the Sv value at its max setpoint.  So variation in Bv should not change anything in the script performance at this point.

Quote
Also, a better way to set exposure before the shot is to use press("shoot_half") to read the meter, compute the exposure, and then use propcases to set the tv96 and sv96. Then press("shoot_full") to take the shot and release the shutter.
I think that should end up doing the same thing down at the "action stack" level.

Quote
As for the incorrect exposure, it sounds like the overrides that you're setting are being cleared, and the camera is using its own computed exposure in shoot(). I'm not sure that's it, but I don't think it would be a problem with the propcase method of setting exposure in half shoot.
That's what it seems to be doing but it only does that approximately half the time when its very dark.  The rest of the time the apex values used match the apex values requested when it's dark.  And it's always correct once the illumination comes up enough require shutter speeds faster than 4 seconds.

Update :  ran on my A1200 shooting into the dark tonight.  Was not able to reproduce the same bug.  It might be camera dependent.  I'll try a version that uses props directly to set exposure values per lapser's suggestion and post it here. 
« Last Edit: 05 / September / 2013, 00:20:07 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline lapser

  • *****
  • 1093
Re: Yet Another Sunset Script (yass) v4.1
« Reply #26 on: 05 / September / 2013, 02:14:02 »
Quote
Also, a better way to set exposure before the shot is to use press("shoot_half") to read the meter, compute the exposure, and then use propcases to set the tv96 and sv96. Then press("shoot_full") to take the shot and release the shutter.
I think that should end up doing the same thing down at the "action stack" level.
That's true, but with the propcase method you can use the exposure measured from the half shoot right before the picture is taken, rather than the previous picture, or doing a double half shoot per picture.

I did a lot of experimenting trying to figure out how to set sv96 using propcases. This is what I came up with. I've used the method in all my timelapses:

Code: [Select]
--initialization code:
props=require("propcase")
pTV=props.TV
pTV2=props.TV2
pSV=props.SV -- real sv
pDELTA_SV=props.DELTA_SV
--pSV_MARKET=props.SV_MARKET -- not needed
ndf=props.ND_FILTER_STATE
props=nil
if(pTV2==nil)then pTV2=pTV end
-- end of init code

--setting exposure
  set_prop(pTV,tv)
  set_prop(pTV2,tv)
--do ND filter here
--setting sv96
  set_prop(pDELTA_SV,sv-get_prop(pSV)+get_prop(pDELTA_SV))
  set_prop(pSV,sv)
I didn't implement the ND filter in Lua, but it should be pretty straightforward.
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

Re: Yet Another Sunset Script (yass) v4.1
« Reply #27 on: 05 / September / 2013, 10:17:16 »
That's true, but with the propcase method you can use the exposure measured from the half shoot right before the picture is taken, rather than the previous picture, or doing a double half shoot per picture.
I'll take a look but as I can't reproduce the problem on my A1200 its hard to test.  I'll try my other cameras when I get a minute.

Quote
I didn't implement the ND filter in Lua, but it should be pretty straightforward.
I think yass4.lua does a pretty good job of managing the ND filter.
Ported :   A1200    SD940   G10    Powershot N    G16


Re: Yet Another Sunset Script (yass) v4.1
« Reply #28 on: 29 / September / 2013, 13:14:56 »
V4.1 needs about 5 secs / frame when shooting raw (I can't make it go any faster).
With v3.4 I could take raw sequence at 3,5 secs / frame.
Any idea how the rate changes if you just shoot jpegs ?

Looking at the code,  there were two changes that will affect the speed. 

First of all, there is a 500mSec delay added after each shoot() command  - put there to let the shot finish before the script logs all its statistics to a file.

Secondly,  the script now checks the exposure immediately before taking the next shot.  With the previous script,  the exposure from the previous shot is used to set the exposure for the next shot.  When I tested this at 15 seconds per shot I found that exposure changes during sunset were occurring too quickly for that to be effective. The extra exposure check could easily add one second to the minimum shooting time.

I removed both of the above "improvements" and bench tested it.  Try the attached hacked script and let me know how it works for you?

Sorry for the delay, I was busy with other things and forgot about testing the script.

This version works much faster - about 3 secs / shot.
Is it possible to include this variant as an option in the main version of the script? There are some situations, when fast operation is useful (city traffic for example).

Re: Yet Another Sunset Script (yass) v4.1
« Reply #29 on: 16 / October / 2013, 07:29:02 »
Is it possible to include some kind of user-defined fixed timer which change shutter speed? For example reduce shutter speed one step every 5 minutes or more dynamic timer like reduce shutter speed one step after 5 minutes, then after 4 minutes, after 3 minutes, etc?

I would like to have code for just that thing above because I don't need other features which might slow down interval shooting when talking about ~ 2 secs intervals.
« Last Edit: 16 / October / 2013, 07:31:57 by Fotoni »

 

Related Topics