kujaku11 / mt_metadata

Tools for standardizing metadata, geared towards magnetotelluric (MT) data but is general enough to accommodate "any" type of metadata.
https://mt-metadata.readthedocs.io/en/latest/
MIT License
19 stars 5 forks source link

Add optional usage of fortranformat strings #162

Closed kkappler closed 1 year ago

kkappler commented 1 year ago

In the old emtf z file, TF numbers were formatted with 0 in the first position. In the TF output the first position is non-zero, it is standard scientific notation.

This commit shows how to get the leading zero output if you have pip-installed fortran_format package.

Deviation from standard scientific notation is relatively rare. The only related post I found re how to do this in python was also about comparing strings from a fortran program. https://stackoverflow.com/questions/21266850/python-scientific-notation-with-forced-leading-zero

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage has no change and project coverage change: -0.04% :warning:

Comparison is base (ce147bd) 82.31% compared to head (c061e4e) 82.27%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## fcs #162 +/- ## ========================================== - Coverage 82.31% 82.27% -0.04% ========================================== Files 269 269 Lines 19545 19554 +9 ========================================== Hits 16088 16088 - Misses 3457 3466 +9 ``` | [Files Changed](https://app.codecov.io/gh/kujaku11/mt_metadata/pull/162?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JP) | Coverage Δ | | |---|---|---| | [mt\_metadata/transfer\_functions/io/zfiles/zmm.py](https://app.codecov.io/gh/kujaku11/mt_metadata/pull/162?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JP#diff-bXRfbWV0YWRhdGEvdHJhbnNmZXJfZnVuY3Rpb25zL2lvL3pmaWxlcy96bW0ucHk=) | `65.59% <0.00%> (-1.21%)` | :arrow_down: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

kkappler commented 1 year ago

This PR shows the fortranformat usage if we ever want it. It introduces another dependency though and we don't currently require it. Closing without merge.