[Ifeffit] Athena crash on mac on import
George Sterbinsky
GeorgeSterbinsky at u.northwestern.edu
Fri Jul 8 21:41:07 CDT 2016
Bruce,
I could not find that particular bit of code in the file. Instead I added
the line you suggested (delete $r_attributes->{bkg_funnorm};) at the end of
this block of code (lines 1488 to 1496)
foreach my $d (@$r_data) {
#print ">>>>>>> $d\n";
my $yaml = ($args{file}) ? $zip->contents("$d.yaml")
: $self->slurp(File::Spec->catfile($args{folder}, "$d.yaml"));
my ($r_attributes, $r_x, $r_y) = YAML::Tiny::Load($yaml);
## the current implementation of XDI support has the xdifile attribute
read-only if Xray::XDI is not available
delete $r_attributes->{xdifile} if (not $INC{'Xray/XDI.pm'});
delete $r_attributes->{fit_pcpath}; # correct an early
delete $r_attributes->{fit_do_pcpath}; # design mistake...
delete $r_attributes->{bkg_funnorm};
and this block (lines 1230 to 1239)
foreach my $which ('', '_standard') {
my $yaml = ($args{file}) ? $zip->contents("$d$which.yaml")
: $self->slurp(File::Spec->catfile($args{folder}, "$d$which.yaml"));
my ($r_attributes, $r_x, $r_y) = YAML::Tiny::Load($yaml);
## the current implementation of XDI support has the xdifile attribute
read-only if Xray::XDI is not available
delete $r_attributes->{xdifile} if (not $INC{'Xray/XDI.pm'});
delete $r_attributes->{fit_pcpath}; # correct an early
delete $r_attributes->{fit_do_pcpath}; # design mistake...
delete $r_attributes->{bkg_funnorm};
I am now able to open the project file without crashing Artemis.
Thank you again for your help.
George
On Fri, Jul 8, 2016 at 8:36 AM, Bruce Ravel <bravel at bnl.gov> wrote:
>
> George,
>
> You can do a similar work-around as before. In
> /opt/local/lib/perl5/site_perl/5.22/darwin-thread-multi-2level/Demeter/Fit.pm,
> near line 1263 (as the traceback indicates) you will find this:
>
> ## correct for change in energy-dependent normalization
> delete $r_attributes->{bkg_fnorm};
>
> add
>
> delete $r_attributes->{bkg_funnorm};
>
>
> B
>
>
>
>
> On 07/05/2016 02:57 PM, George Sterbinsky wrote:
>
>> Bruce,
>>
>> I am seeing a similar issue with Artemis. Upon trying to open a .fpj
>> file created elsewhere, Artemis crashes and the following message is
>> printed to the terminal. Any suggestions as to a possible fix? I have
>> not attached the file since it is not mine to share, but if you need it
>> or anything else please let me know.
>>
>> Thank you,
>> George
>>
>>
>> [!!!] bkg_funnorm is not an attribute to set for
>> Demeter::Data=HASH(0x7fdb97cd4810) at
>>
>> /opt/local/lib/perl5/site_perl/5.22/darwin-thread-multi-2level/MooseX/SetGet.pm
>> line 9.
>> MooseX::SetGet::set(Demeter::Data=HASH(0x7fdb97cd4810), "bkg_pre1",
>> -205, "multiplier", 1, "energy_string", "", "name", "merge 4", ...)
>> called at
>>
>> /opt/local/lib/perl5/site_perl/5.22/darwin-thread-multi-2level/Demeter/Fit.pm
>> line 1263
>> Demeter::Fit::grab(Demeter::Fit=HASH(0x7fdb79280ba0), "folder",
>> "/Users/.../.horae/stash/_dem_nsqtbpqj/fits/iaple", "regenerate", 0)
>> called at
>>
>> /opt/local/lib/perl5/site_perl/5.22/darwin-thread-multi-2level/Demeter/UI/Artemis/Project.pm
>> line 397
>> Demeter::UI::Artemis::Project::read_project(HASH(0x7fdb93be5ff0))
>> called at
>>
>> /opt/local/lib/perl5/site_perl/5.22/darwin-thread-multi-2level/Demeter/UI/Artemis.pm
>> line 990
>> Demeter::UI::Artemis::OnMenuClick(Wx::Frame=HASH(0x7fdb96c547c0),
>> Wx::CommandEvent=SCALAR(0x7fdb96c576a0)) called at
>>
>> /opt/local/lib/perl5/site_perl/5.22/darwin-thread-multi-2level/Demeter/UI/Artemis.pm
>> line 434
>> Demeter::UI::Artemis::__ANON__(Wx::Frame=HASH(0x7fdb96c547c0),
>> Wx::CommandEvent=SCALAR(0x7fdb96c576a0)) called at
>> /opt/local/bin/Artemis line 47
>> eval {...} called at /opt/local/bin/Artemis line 47
>>
>> On Fri, Jul 1, 2016 at 4:26 PM, Bruce Ravel <bravel at bnl.gov
>> <mailto:bravel at bnl.gov>> wrote:
>>
>>
>> That was the right thing to do. Glad it worked.
>>
>> B
>>
>> On 07/01/2016 04:19 PM, George Sterbinsky wrote:
>>
>> Hi Bruce,
>>
>> Thanks for providing a fix. The Prj.pm file on my system does
>> not look
>> exactly like what you describe. Lines 260 to 268 looked like this:
>>
>> next if any { $k eq $_ } qw(
>>
>> bindtag deg_tol denominator detectors
>>
>> en_str file frozen line mu_str
>>
>> numerator old_group original_label
>>
>> peak refsame not_data
>>
>> bkg_switch bkg_switch2
>>
>> is_xmu is_chi is_xanes is_xmudat
>>
>> bkg_stan_lab bkg_flatten_was
>>
>> );
>>
>>
>> After line 267, I added a new line that reads "bkg_fnorm
>> bkg_funnorm" as
>> you suggested, and now I am able to open the prj file.
>>
>> Thanks again,
>> George
>>
>>
>>
>> On Fri, Jul 1, 2016 at 3:17 PM, Bruce Ravel <bravel at bnl.gov
>> <mailto:bravel at bnl.gov>
>> <mailto:bravel at bnl.gov <mailto:bravel at bnl.gov>>> wrote:
>>
>> On 07/01/2016 03:00 PM, Bruce Ravel wrote:
>>
>> There is probably a simple-ish work-around. Let me
>> think about
>> it and
>> I'll get back to you.
>>
>>
>> There's not a way to simply fix this that does not involve
>> you
>> upgrading Demeter. However, if you don't mind a bit of
>> hands on
>> effort, try this:
>>
>> * Open the file
>>
>>
>> /opt/local/lib/perl5/site_perl/5.22/darwin-thread-multi-2level/Demeter/Data/Prj.pm
>> in a text editor (not Word!).
>>
>> * Go to line 308. Here's what the surrounding lines
>> lines look like:
>>
>> next if any { $k eq $_ } qw(
>> bindtag deg_tol
>> denominator detectors
>> en_str file frozen line
>> mu_str
>> numerator old_group
>> original_label
>> peak refsame not_data
>> bkg_switch bkg_switch2
>> is_xmu is_chi is_xanes
>> is_xmudat
>> bkg_stan_lab
>> bkg_flatten_was
>> bkg_fnorm
>> );
>> Line 308 is the one that says "bkg_fnorm". Edit this
>> to read
>> "bkg_fnorm bkg_funnorm". Save.
>>
>> Try reading in the project file again. I tested this and I
>> think it
>> will work. Let me see the error message if this idea
>> doesn't.
>>
>> B
>>
>> P.S. The Prj.pm file might be in a different location on
>> someone
>> else's computer.
>>
>>
>>
>>
>> --
>> Bruce Ravel ------------------------------------
>> bravel at bnl.gov <mailto:bravel at bnl.gov>
>> <mailto:bravel at bnl.gov <mailto:bravel at bnl.gov>>
>>
>> National Institute of Standards and Technology
>> Synchrotron Science Group at NSLS-II
>> Building 743, Room 114
>> Upton NY, 11973
>>
>> Homepage: http://bruceravel.github.io/home/
>> Software: https://github.com/bruceravel
>> Demeter: http://bruceravel.github.io/demeter/
>> _______________________________________________
>> Ifeffit mailing list
>> Ifeffit at millenia.cars.aps.anl.gov
>> <mailto:Ifeffit at millenia.cars.aps.anl.gov>
>> <mailto:Ifeffit at millenia.cars.aps.anl.gov
>>
>> <mailto:Ifeffit at millenia.cars.aps.anl.gov>>
>> http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
>> Unsubscribe:
>> http://millenia.cars.aps.anl.gov/mailman/options/ifeffit
>>
>>
>>
>>
>> _______________________________________________
>> Ifeffit mailing list
>> Ifeffit at millenia.cars.aps.anl.gov
>> <mailto:Ifeffit at millenia.cars.aps.anl.gov>
>> http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
>> Unsubscribe:
>> http://millenia.cars.aps.anl.gov/mailman/options/ifeffit
>>
>>
>>
>> --
>> Bruce Ravel ------------------------------------ bravel at bnl.gov
>> <mailto:bravel at bnl.gov>
>>
>> National Institute of Standards and Technology
>> Synchrotron Science Group at NSLS-II
>> Building 743, Room 114
>> Upton NY, 11973
>>
>> Homepage: http://bruceravel.github.io/home/
>> Software: https://github.com/bruceravel
>> Demeter: http://bruceravel.github.io/demeter/
>> _______________________________________________
>> Ifeffit mailing list
>> Ifeffit at millenia.cars.aps.anl.gov
>> <mailto:Ifeffit at millenia.cars.aps.anl.gov>
>> http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
>> Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit
>>
>>
>>
>>
>> _______________________________________________
>> Ifeffit mailing list
>> Ifeffit at millenia.cars.aps.anl.gov
>> http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
>> Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit
>>
>>
>
> --
> Bruce Ravel ------------------------------------ bravel at bnl.gov
>
> National Institute of Standards and Technology
> Synchrotron Science Group at NSLS-II
> Building 743, Room 114
> Upton NY, 11973
>
> Homepage: http://bruceravel.github.io/home/
> Software: https://github.com/bruceravel
> Demeter: http://bruceravel.github.io/demeter/
> _______________________________________________
> Ifeffit mailing list
> Ifeffit at millenia.cars.aps.anl.gov
> http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
> Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://millenia.cars.aps.anl.gov/pipermail/ifeffit/attachments/20160708/a30a36cd/attachment-0001.html>
More information about the Ifeffit
mailing list