File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -316,12 +316,13 @@ def _get_spatial_coordinate_unit(segy_file_info: SegyFileInfo) -> LengthUnitMode
316316
317317def _update_template_units (template : AbstractDatasetTemplate , unit : LengthUnitModel | None ) -> AbstractDatasetTemplate :
318318 """Update the template with dynamic and some pre-defined units."""
319- if unit is None :
320- return template
321-
322319 # Add units for pre-defined: angle and azimuth etc.
323320 new_units = {key : AngleUnitModel (angle = AngleUnitEnum .DEGREES ) for key in ANGLE_UNIT_KEYS }
324321
322+ # If a spatial unit is not provided, we return as is
323+ if unit is None :
324+ return template
325+
325326 # Dynamically add units based on the spatial coordinate unit
326327 for key in SPATIAL_UNIT_KEYS :
327328 current_value = template .get_unit_by_key (key )
You can’t perform that action at this time.
0 commit comments