Read h offset files and store them to origin file with new h_offset-column#47
Read h offset files and store them to origin file with new h_offset-column#47tillpiepenbrock merged 6 commits intomainfrom
Conversation
examples/combine_material_data.py
Outdated
| @@ -0,0 +1,39 @@ | |||
| """Example to combine material data. | |||
|
|
|||
| This script enables users to combine material data, if this is still no done. | |||
There was a problem hiding this comment.
I do not understand the sentence "if this is still no done"
There was a problem hiding this comment.
"if this is still no done" is removed. Background:
Typo: Shall be "if this is still not done".
This belongs to two facts:
1: The combination are not performed.for all materials
2: New measurements is copied to the folder.
In all other cased the function will not change the data.
|
|
||
| return (mur_0 * k_0 + k_1 * (mur_1 * B + mur_2 * B ** 2)) * k_f | ||
|
|
||
| # Added by ASA only guess |
There was a problem hiding this comment.
isn't this a hardcopy of existing code?
Rather rename the original fit_mu_abs and use it in both cases (MagNet and LEA_MTB)
There was a problem hiding this comment.
I will update it according your proposal.
|
|
||
| if exclude_dc_bias: | ||
| # exclude_dc_bias: | ||
| if False: |
There was a problem hiding this comment.
remove, as you solved it ...
There was a problem hiding this comment.
Remaining debug code. Will be removed.
Background: Improper merge done before.
…ermeability'. Add h_offset column to csv-files of materials N49, N87, and N95
| material: Material, | ||
| data_source: DataSource, | ||
| data_type: ComplexDataType, | ||
| h_offset: float = 0, |
There was a problem hiding this comment.
for reasons of code modularization:
Is it possible to get rid of h_offset in "get_complex_data_set()"? Because this function should be as general as possible and is called in "get_complex_permeability()" and "get_complex_permittivity()".
The h_offset is only needed in case of "get_complex_permeability()".
Collect all files with h-offset and store it in the origin file. This leads to the result, that the column 'h_offset' is added to the material data csv-file.
Moreover the data files are read with the requested h_offset and available h-offsets can be read out by a new method.
All functions are still backward compatible.
If you read a csv-file without a 'h_offset'-column this column will be added automatically. In this case the origin file will be backup with the origin name plus postfix '_backup' or if such a file exists with postfix '_backup[number]'.
[number] is choosen to a number, which creates a file name, that still does not exists, eg. 'N27_backup2.csv' if
'N27_backup.csv' and 'N27_backup1.csv' still exists.