Members: 75,790   Posts: 1,671,547   Online: 884

# Thread: Film curve plotting and fitting

1. ## Film curve plotting and fitting

Hi,
Over the past year or so, there have been at least two long threads here on the topic of plotting characteristic curves and fitting smooth functions to them. I have been playing with something along these lines, and I thought that there might be some interest in it. I am posting this in the hopes that someone might find it useful (or amusing) or might have some suggestions. I'll try to keep it fairly short, but would be happy to answer questions.

My idea is to fit the measured densities to a relatively simple mathematical function with a small number of parameters. After a bit of playing around I found this function:
D(x) = a1*ln(1+exp(a2*x + a3))
where D is density, x is exposure (on a logarithmic scale) and a1,a2, a3 are constants. ln is the natural logarithm and exp is the number e raised to the power in the parentheses.

The basic features of this function are that it begins at zero with zero slope, and the slope increases monotonically to a limiting value. It can thus describe the toe and linear region of a characteristic curve, but it is not suitable for a shoulder. My sense is that most modern films don't have much of a shoulder, and the toe and linear regions are, in any case, the important parts for assessing speed and contrast.

So far as I know, the equation and the parameters don't have any physical significance, but they are related to the shape of the curve in convenient ways:
1. The limiting slope of the linear region is a1*a2. If the exposure values are plotted as log base 10 values, this gives gamma. If (as I prefer) the values are plotted as log base 2, gamma is calculated as a1*a2/log10(2).

2. A fractional gradient (fg) can be defined as the gradient at any point divided by the limiting slope. This can be calculated as:
fg= 1/(1+exp(-a2*x - a3))
and can be solved for x to determine the exposure for a given fractional gradient:
x = (ln(f/(1-f))-a3)/a2
This can be used to calculate a speed point based on a defined fractional gradient (e.g. 0.3 or 0.5)

3. If the position of the toe is defined as the point where the fractional gradient is 0.5, this point is where:
x = -a3/a2

4. The width of the toe can be defined as distance between x values where fg = 0.1 and 0.9 (other values could be used, of course):
w = 2*ln(9)/a2

5. The equation for density can also be solved for x to give the exposure for a given density:
x = (ln(exp(D/a1) - 1)-a3)/a2
This can be used to calculate a speed point based on a minum density (e.g. 0.1)

The potential value of all of this is, I think, that it provides a fairly objective way of analyzing data and deriving parameters.

So far I have implemented this scheme in a Python script, using publicly available modules for the most of the math and plotting. I am attaching a sample plot, for TMY-2 developed in Pyrocat HD. In addition to the plot, the program outputs the following information:

15 min @ 73 F (blue)

gamma = 0.64 +/- 0.02
toe width = 2.55 +/- 0.76 stops
Exposure index set from density threshold (Zone I density = 0.10):
Speed point = -2.67 +/- 0.14 (log2exposure)
Corrected EI = 159.31 +/- 15.23
Avg. gradient (log10) = 0.60 +/- 0.02
Zone I density = 0.10
Zone V density = 0.81
Zone VIII density = 1.38

Speed point = -3.38 +/- 0.12 (log2exposure)
Corrected EI = 260.80 +/- 20.89
Avg. gradient (log10) = 0.55 +/- 0.02
Zone I density = 0.04
Zone V density = 0.67
Zone VIII density = 1.25

The data for these curves were measured from camera exposures. My usual practice is to define log2(exp) = 0 as the exposure indicated by the meter. The program takes the EI used for the meter measurement, and calculates corrected EI values using defined values for fractional gradient or density threshold (Zone I density). It then calculates densities for Zone I, V and VIII based on the corrected EI.

I hope that this will be of interest to those with a weakness for the more geeky end of photography! In its present form, the program is not particularly user-friendly, but I am happy to share it. If there is substantial interest, I may also be willing to put in a bit more time to make it friendlier.

David

2. The straight line portion is the only significant part of these curves, (-2 to 4 log E) and the slope is the only part of that that matters beyond that!

PE

3. It would be nice to have an equation format that works with film and paper. This, of course, requires adequate shoulder representation. I have posted non-linear equations in the past, which can do that, but they are not fully automatic. They do need a bit of manual tweaking of the parameters for hard paper curves.

4. Originally Posted by dpgoldenberg
Hi,

gamma = 0.64 +/- 0.02
toe width = 2.55 +/- 0.76 stops
Exposure index set from density threshold (Zone I density = 0.10):
Speed point = -2.67 +/- 0.14 (log2exposure)
Corrected EI = 159.31 +/- 15.23
Avg. gradient (log10) = 0.60 +/- 0.02
Zone I density = 0.10
Zone V density = 0.81
Zone VIII density = 1.38

Speed point = -3.38 +/- 0.12 (log2exposure)
Corrected EI = 260.80 +/- 20.89
Avg. gradient (log10) = 0.55 +/- 0.02
Zone I density = 0.04
Zone V density = 0.67
Zone VIII density = 1.25
I can't speak to the formulas, but with an average gradient of 0.60, the two speed methods should be in close agreement, or if you are using the formula for FG from before 1960, the FG speed should be one stop lower than the 0.10 fixed density method of 0.10. The FG speed point isn't where the exposure is supposed to fall, but the point from which the film speed is calculated. The FG method uses a constant. The current value for the constant is 0.4. In actuality, the fixed density method is similar in that the point where film speed is calculated isn't necessarily where the exposure is designed to fall. The fixed density method has a constant of 0.8 which shifts lowers the film speed by 1/3 stop.

Applying Zone System values to either of these two methods is also problematic because it is a method onto itself and uses different parameters; however, although not as much with the fixed density method as with the FG method.

5. Thanks to those who offered comments. I'll just reply briefly to all three:

Photo Engineer: Perhaps I didn't choose the best examples for my curves. I am attaching another plot with two curves for Delta 100, one developed with FX-37 and one with Pyrocat HD. These examples show that my fitting function can do a pretty good job on quite different shapes in the two region. FX-37 gives a much broader toe.

Ralph: I haven't given much thought to shoulders. But something that might work is to fit the curve in two parts: First fit the two and linear regions with my function, and then use a sort of mirror image of this function to fit the shoulder, forcing the linear part from the shoulder to fit the linear part from the first fit.

Stephen: I should explain that I am not really trying to match the standardized methods for establishing speeds, but rather doing simple testing for my own purposes, in a zone-system fashion. As I indicated in my original post my "fractional gradient" is based on the limiting gradient (gamma), not an average gradient as used in the old official fractional gradient methods. This should be slightly more conservative than the official fractional gradient method. To get my EI, I am just taking the speed point from the threshold density (or my fractional gradient) and setting this to give 4 stops underexposure from the meter reading (Zone I).

I have seen references to the constants you mentioned, but haven't seen a very clear explanation. Could you point me to a reference?

Thanks,
David

6. David;

If you wish a good uniform representation of the scene, the fact still remains that the straight line portion of the curve should be used otherwise you compress the scale due to the change in slope (decrease in contrast).

The accepted figures are a slope of about 0.6 for a negative film (often corrected to about 0.65 for flare) and about 2.5 for a grade 2 paper. Of course, with the paper, the toe and shoulder are important. These control fractional gradients.

PE

7. PE,
Thanks. Now I see and appreciate your point, which I didn't at first. I am just suggesting that my curve-fitting method provides an automatic method to define the curve, which can then be used in any way to decide whether the contrast is appropriate and where the exposures should lie. The mathematical function can be manipulated to calculate the speed by just about any criteria (though some, like the traditional fractional gradient method would require an iterative procedure). Not that I am suggesting that anyone throw out their graph paper, rulers and French curves . . .

David

8. Originally Posted by dpgoldenberg
Stephen: I should explain that I am not really trying to match the standardized methods for establishing speeds, but rather doing simple testing for my own purposes, in a zone-system fashion. As I indicated in my original post my "fractional gradient" is based on the limiting gradient (gamma), not an average gradient as used in the old official fractional gradient methods. This should be slightly more conservative than the official fractional gradient method. To get my EI, I am just taking the speed point from the threshold density (or my fractional gradient) and setting this to give 4 stops underexposure from the meter reading (Zone I).

I have seen references to the constants you mentioned, but haven't seen a very clear explanation. Could you point me to a reference?
The best material is at the source. I have the first one in a pdf file so if you want to send me your email address, I'd be happy to send it.

Nelson, C.N., Safety Factors in Camera Exposures, Photographic Science and Engineering, v.4 no. 1, Jan-Feb 1960.

Nelson, C.N. and Simonds, J.L., Simple Methods for Approximating the Fractional Gradient Speeds of Photographic Materials, Journal of the Optical Society of America, v. 46 no. 5, May 1956.

If you want to understand more about the fundamental concept of film speed, check out Loyd Jones' seminal papers from the 30s and 40s.

It's also important to understand the standard model of exposure.

Connelly, D, Calibration Levels of Film and Exposure Devices, The Journal of Photographic Science, v. 16, 1968.

Stimson, Allen, An Interpretation of Current Exposure Meter Technology, Photographic Science and Engineering, v. 6 no. 1, Jan-Feb 1962.

There are a couple good books you might also want to look into.

Photographic Sensitometry: The Study of Tone Reproduction by Todd and Zakia.

Exposure Manual by Dunn and Wakefield. Appendix B

Photographic Materials and Processes, by Stroebel, Compton, Current, and Zakia.

The Manual of Photography, by Jacobson, Ray, Attridge, and Axford.

The Theory of the Photographic Process, 3rd edition.

David, I'm not so concerned with the shadow gradient you are using. I wanted to point out that while the original Fractional Gradient method had the speed point one stop to the left of the fixed density point of 0.10, the film speeds weren't 1 stop faster, but one stop slower. Your film speed for your gradient method is 2/3 of a stop faster than the fixed density method for the same film test. Drawing curves is great, but interpreting them correctly is key.

Speed points aren't necessarily about where the shadow exposure is supposed to fall but a point that can be defined and creates the best and most consistent quality with the greatest variety of films. Prior to 1960, the difference between the FG speed point and where the shadow exposure was supposed to fall was around two stops.

I would also like to warn you that there are discrepancies between tone reproduction / sensitometry and the Zone System. Trying to correlate them without factoring in the discrepancies can introduce errors interpreting the curve data. The second group of papers can help with the standard model of exposure. Spoiler alert. One of the biggest differences is that the Zone System uses a 4 stop range between the metered exposure and shadow density and tone reproduction theory (read ISO and the standard model) uses a 3 1/3 stop range. Another is flare. The ISO speed method, the fractional gradient method, and standard model all factor it in, the ZS doesn't. Flare is also an important factor when determining negative density range and average gradient.

Steve

9. Steve,
Thanks very much for all of the reading suggestions and comments. I'll send you a personal message with an e-mail address. I think that I now at least understand the offset between fg=0.3 and D=0.1. I was treating them equivalently as the point for the shadow density, so it makes sense that my fg speed was faster than the D=0.1 speed. My naive take on it was that the two offered a reasonable bound for a practical EI.

David

10. Originally Posted by dpgoldenberg
Steve,
Thanks very much for all of the reading suggestions and comments. I'll send you a personal message with an e-mail address. I think that I now at least understand the offset between fg=0.3 and D=0.1. I was treating them equivalently as the point for the shadow density, so it makes sense that my fg speed was faster than the D=0.1 speed. My naive take on it was that the two offered a reasonable bound for a practical EI.

David
That's not so naive. A fixed minimum density value does offer a reasonable approach for a practical EI, but I don't think it should be as low as 0.1. You can achieve similar results to the fractional gradient by moving the speed point higher up on the characteristic curve. 0.17 for example is a very reasonable speed point for modern films. Of course, that is not Zone I but Zone I.5.

Page 1 of 42 123456711 ... Last

 APUG PARTNERS EQUALLY FUNDING OUR COMMUNITY: