pub struct Halation {
pub pixel_um: f64,
pub scatter: Halo,
pub reflection: Halo,
}Expand description
Both halation components for one image, with its scale on the film.
Fields§
§pixel_um: f64Size of one pixel on the film, in micrometres across.
scatter: HaloDiffusion inside the emulsion: short, and almost colour-neutral.
reflection: HaloReflection off the base: long, and red by the time it returns.
Implementations§
Source§impl Halation
impl Halation
Sourcepub const BASE_THICKNESS_MM: f64 = 0.135
pub const BASE_THICKNESS_MM: f64 = 0.135
Thickness of the film base, in millimetres.
The halo’s size follows from it and from nothing else that varies: a photographic base is 0.125–0.135 mm across every manufacturer’s sheet, and 0.135 is the thick end.
Sourcepub const FILM_INDEX: f64 = 1.5
pub const FILM_INDEX: f64 = 1.5
Refractive index of the base, which is what bends the returning cone.
Sourcepub fn reflection_radius_um(f_number: f64) -> f64
pub fn reflection_radius_um(f_number: f64) -> f64
How far the reflection halo reaches on the film, at a given aperture.
The light that comes back travelled down through the base and up again,
so its cone is the lens’s, refracted into the base and stretched over
twice 135 µm. The marginal ray outside is atan(1/2N); inside it is
asin(sin(θ)/n); the radius at the emulsion is 2B·tan of that.
There is no free parameter here, which is the point: the sigma was the one number in this file that could be derived instead of guessed.
Sourcepub fn for_aperture(pixel_um: f64, f_number: f64) -> Self
pub fn for_aperture(pixel_um: f64, f_number: f64) -> Self
Both components for an exposure made at a particular aperture.
pixel_um is the film-plane size of one pixel, so the kernels are
expressed in micrometres and do not change when the scan resolution does.
The reflection halo’s width now comes from the geometry; its
strength, and both of the scatter term’s numbers, are still
placeholders — see the module documentation. A Gaussian of
radius / 2 carries the same second moment as a disc of that radius,
which is as much as a geometry can say about the shape.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Halation
impl Freeze for Halation
impl Move for Halation
impl RefUnwindSafe for Halation
impl Send for Halation
impl Sync for Halation
impl Unpin for Halation
impl UnsafeUnpin for Halation
impl UnwindSafe for Halation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more