XMM-Newton SAS Home Page
XMM-Newton Science Analysis System


cifdiff (cifbuild-4.10.1) [xmmsas_20230412_1735-21.0.0]


Algorithm

  string c1 = stringParameter("calindex1set");
  string c2 = stringParameter("calindex2set");
  CalIndex cif1 = CalIndexSet(c1).calibrationIndex("cif1");
  CalIndex cif2 = CalIndexSet(c2).calibrationIndex("cif2");
  ofstream out(stringParameter("outfile").c_str());

  cif1.sort(CcfConstituent::compare);
  cif2.sort(CcfConstituent::compare);

  CalIndex cif3("cif3");
  set_difference(cif1.begin(), cif1.end(), cif2.begin(), cif2.end(), back_inserter(cif3), CcfConstituent::compare);
  out << "CCF constituents that are in " << c1 << " but not in " << c2 << ":" << endl;
  if(cif3.size() == 0)
    out << "** none **" << endl;
  else
    for(CalIndex::const_iterator i = cif3.begin(); i != cif3.end(); i++)
      out << (*i)->name() << endl;

   // repeat swapping cif1 and cif2



XMM-Newton SOC -- 2023-04-16