pub struct IesFile { /* private fields */ }
Implementations
sourceimpl IesFile
impl IesFile
sourcepub fn parse_file(filepath: &Path) -> Result<IesFile, Error>
pub fn parse_file(filepath: &Path) -> Result<IesFile, Error>
A wrapper around the parsing code, that opens a file and reads it.
sourcepub fn parse(&mut self, ies_string: &String) -> Result<(), Error>
pub fn parse(&mut self, ies_string: &String) -> Result<(), Error>
Attempts to parse an input file.
sourcepub fn parse_keywords(&mut self, ies_string: &String) -> Result<(), Error>
pub fn parse_keywords(&mut self, ies_string: &String) -> Result<(), Error>
Parses the keywords section of the file.
pub fn parse_tilt(&mut self, ies_string: &String) -> Result<(), Error>
sourcepub fn parse_properties(&mut self, ies_string: &String) -> Result<(), Error>
pub fn parse_properties(&mut self, ies_string: &String) -> Result<(), Error>
This function reads the properties from the file into the data structure.
sourcepub fn vertical_angles_valid(angles: &Vec<f64>) -> bool
pub fn vertical_angles_valid(angles: &Vec<f64>) -> bool
Checks to see that the vertical angles are valid according to the IES standard, The valid configurations are:
- Completely in the bottom hemisphere: first angles and 0 degrees and 90 degress respectively.
- Completely in the top hemisphere: first angles and 90 degrees and 180 degress respectively.
- Otherwise: first angles and 0 degrees and 180 degress respectively.
sourcepub fn horizontal_angles_valid(angles: &Vec<f64>) -> bool
pub fn horizontal_angles_valid(angles: &Vec<f64>) -> bool
Checks to see that the horizontal angles are valid according to the IES standard. In this case, the angles are mainly used to defined symmetries, the rules are:
- First angle must always be 0.0.
- If the last values is 0.0, the distribution is axially symmetric.
- If the last value is 90.0 degress, the distribution is symmetric in each quadrant.
- If the last value is 180.0 degress, the distribution is symmetric about a vertical plane.
- If the last value is greater than 180.0 and less than or equal to 360.0, no lateral symmetries.
- Hence, the valid last values are: 0.0, 90.0, 180.0 - 360.0.
sourcepub fn to_file(&self, outpath: &Path) -> Result<(), Error>
pub fn to_file(&self, outpath: &Path) -> Result<(), Error>
Writes the currently loaded EULUMDAT file to a specified file.
The written value is determined by LdtFile::to_string(&self)
.
sourcepub fn keywords_to_string(&self) -> String
pub fn keywords_to_string(&self) -> String
Outputs the keywords in the file to a string.
sourcepub fn get_luminous_opening(&self) -> IesLuminousOpening
pub fn get_luminous_opening(&self) -> IesLuminousOpening
Get the type and properties of the luminous opening.
sourcepub fn get_planes(&self) -> Vec<Plane>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
pub fn get_planes(&self) -> Vec<Plane>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
Gets the planes from this object.
sourcepub fn get_planes_type_a(&self) -> Vec<Plane>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
pub fn get_planes_type_a(&self) -> Vec<Plane>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
Get the planes from a Type A photometry IES file.