New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
livdb_magic produces extra columns and is missing req'd columns #418
Comments
measurements_methods3 is not called in livdb. I tested this on the LIVDB_magic/TH_IZZI+ data. The problem was that MeasRec['treat_ac_field'] wasn't initialized across all records. In non-AF studies, treat_ac_field is only set if there are no prior treatments AND peak field is not 999, -99 or 0. In the TH_IZZI+ data, the first peak field is 0. So the first MeasRec doesn't have the treat_ac_field column. Because magic_write assumes that all records will have the same columns as the first record, treat_ac_field is not written for any of the records. This is the logic in livdb that sets treat_ac_field:
I can solve this problem by initializing There are no AF examples in the example data, but this is the only other place where treat_ac_field can be set.
|
Yes I think that will work - I can test it on other examples
…On Mon, Aug 20, 2018 at 4:55 PM Lori J ***@***.***> wrote:
measurements_methods3 is not called in livdb.
I tested this on the LIVDB_magic/TH_IZZI+ data.
The problem was that MeasRec['treat_ac_field'] wasn't initialized across
all records. In non-AF studies, treat_ac_field is only set if there are no
prior treatments AND peak field is not 999, -99 or 0. In the TH_IZZI+ data,
the first peak field is 0. So the first MeasRec doesn't have the
treat_ac_field column. Because magic_write assumes that all records will
have the same columns as the first record, treat_ac_field is not written
for any of the records.
This is the logic in livdb that sets treat_ac_field:
no_treatments_yet = True
for t in experiment_treatments:
t = float(t.strip())
if t > 50:
no_treatments_yet=False
#print(' no treatments yet?', no_treatments_yet)
if no_treatments_yet:
#print( 'af demag remag peak field', meas_line['AF Demag/Remag Peak Field'])
if meas_line['AF Demag/Remag Peak Field'] != "" and \
float(meas_line['AF Demag/Remag Peak Field']) != 999 and \
float(meas_line['AF Demag/Remag Peak Field']) != -99 and \
float(meas_line['AF Demag/Remag Peak Field']) != 0:
lab_treatment = "LT-AF-Z"
MagRec[ac_field_col] = '%8.3e' % (
float(meas_line['AF Demag/Remag Peak Field'])*1e-3) # peak field in tesla
I can solve this problem by initializing MagRec[ac_field_col] = "" in all
cases. @ltauxe <https://github.com/ltauxe>, let me know if there's
something I'm not understanding about how this should work.
There are no AF examples in the example data, but this is the only other
place where treat_ac_field can be set.
elif "AF-" in Experiment_Type:
MagRec[ac_field_col] = '%8.3e' % (
float(meas_line['TH Demag/Remag Peak Temperature'])*1e-3) # peak field in tesla
treatment = meas_line['AF Demag/Remag Peak Field']
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#418 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAKrDaCGquxHrfhEkCnW7yizjyllRwJyks5uS0x3gaJpZM4V-rFJ>
.
|
@ltauxe, I also fixed livdb so it will generate samples/sites/locations tables if possible. Let me know if you have more problems here. |
New error:
|
@ltauxe, this is kinda rough. I'm using the data_files/Measurement_Import/LIVDB_magic/MW_C+ data. The problem is that Thellier GUI is trying to index on the list of 'treatment_mw_power' values:
But, the values in the drop down boxes for tmin/tmax are:
which is generated from Step number in the description column:
which really isn't the mw power at all. Also, this is very specific to a particular format... What do you think? |
@ltauxe, I put in a possible solution for this. Give it a try and see if it seems like the expected behavior to you. It's a little odd, how this was set up.... |
will do
… On Aug 22, 2018, at 12:46 PM, Lori J ***@***.***> wrote:
@ltauxe <https://github.com/ltauxe>, I put in a possible solution for this. Give it a try and see if it seems like the expected behavior to you. It's a little odd, how this was set up....
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#418 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAKrDSlsxRvunSoHaFlOn3rvMy86KIUCks5uTbUjgaJpZM4V-rFJ>.
|
this seems to work ok now. |
produces a very out of date data model 3.0 - it has many un-necessary columns (like sample, site) but is missing the required fields of treat_ac_field and sequence. It does add them but somehow measurements_methods3 removes them and i can't see where.
The text was updated successfully, but these errors were encountered: