Linear Combination Fitting

LCF

  1. #!/usr/bin/perl
  2. use Demeter qw(:ui=screen :plotwith=gnuplot);
  3. my $prj = Demeter::Data::Prj -> new(file=>'../../cyanobacteria.prj');
  4. my $lcf = Demeter::LCF -> new(space=>'nor', plot_difference=>1, plot_components=>1);
  5. $prj -> set_mode('screen' => 1);
  6. my $data = $prj->record(4);
  7. my ($metal, $chloride, $sulfide) = $prj->records(9, 11, 15);
  8. $lcf->data($data);
  9. $lcf->add_many($metal, $chloride, $sulfide);
  10. $lcf->xmin($data->bkg_e0-20);
  11. $lcf->xmax($data->bkg_e0+60);
  12. $lcf->po->set(emin=>-30, emax=>80);
  13. $lcf -> fit -> plot -> save('lcf_fit_result.dat');
  14. $lcf->pause;
  15. $lcf->clean;