#### Topic: Photography Methods

Any comments, corrections, refactorings or suggestions would be fantastic, thanks.
Hopefully we might have some photography nuts out there too

`# camera relateddef frame_diagonal(frame_horizontal, frame_vertical)    @frame_diagonal = Math.sqrt((frame_horizontal**2) + (frame_vertical**2))enddef focal_length_multiplier(frame_diagonal_1, frame_diagonal_2)    @focal_length_multiplier = frame_diagonal_1 / frame_diagonal_2enddef circle_of_confusion(frame_diagonal)    @circle_of_confusion = frame_diagonal / 1730end# lens relateddef hyperfocal_distance(focal_length, f_number, circle_of_confusion)    @hyperfocal_distance = ((focal_length**2) / (f_number * circle_of_confusion)) + focal_lengthenddef near_distance(focus_distance, hyperfocal_distance, focal_length)    @near_distance = (focus_distance * (hyperfocal_distance - focal_length)) / (hyperfocal_distance + focus_distance - 2 * focal_length)enddef far_distance(focus_distance, hyperfocal_distance, focal_length)    @far_distance = (focus_distance * (hyperfocal_distance - focal_length)) / (hyperfocal_distance - focus_distance)enddef total_distance(near_distance, far_distance)    @total_distance = far_distance - near_distanceenddef magnification(focal_length, focus_distance)    @magnification = focal_length/(focus_distance - focal_length)enddef fov_rectilinear_horizontal(frame_horizontal, focal_length, magnification)    @fov_rectilinear = 2 * Math.arctan(frame_horizontal/(focal_length * 2 * (magnification+1)))enddef fov_rectilinear_vertical(frame_vertical, focal_length, magnification)    @fov_rectilinear = 2 * Math.arctan(frame_vertical/(focal_length * 2 * (magnification+1)))enddef fov_rectilinear_diagonal(frame_diagonal, focal_length, magnification)    @fov_rectilinear = 2 * Math.arctan(frame_diagonal/(focal_length * 2 * (magnification+1)))enddef f_number_to_aperture_diameter(focal_length, f_number)    @aperture_diameter = focal_length / f_numberend# exposure relateddef exposure_value(f_number, shutter_speed)    @exposure_value = Math.logn(2, (f_number**2 / shutter_speed))end# math relateddef Math.logn(x, n)    Math.log(x) / Math.log(n)enddef Math.arctan(x)    Math.atan2(x, 1.0)end`

#### Re: Photography Methods

As I don't know what all is going on, I can't help much.  But there are a couple of repeated equation pieces that could be pulled into methods of their own.

`def distance_helper(focus_distance, hyperfocal_distance, focal_length)  focus_distance * (hyperfocal_distance - focal_length)enddef fav_rectilinear_helper(specific_frame, focal_length, magnification)  2 * Math.arctan(specific_frame/(focal_length * 2 * (magnification+1)))end`

Beyond that, there are some items that confuse me.  You have a method named magnification that takes arguments.  Then you have references in other methods to what looks to be a variable named magnification.  Similarly, circle_of_confusion.  Is that a reference to @circle_of_confusion?  Clearly expressive code is cleaner code.