pyIBA.main_idf#

class pyIBA.main_idf#

Main engime of pyIDF. This classes contains all of the methods to edit the fundamental XML schema for the IDF files. Note that the analysis entries have their own distinct classes and XML schemas.

__init__()#

Methods

__init__()

append_simulation_entry(total_simulations[, ...])

Change the total number of simulation entries of spectrum = spectra_id.

append_spectrum_entry(total_spectra)

Change the total number of spectra.

change_node_value(value, parent, keyword[, ...])

Changes the value of the XML node.

create_element(parent, keyword)

Creates a XML node

create_tree(tree[, prefix])

Creates a tree of parents in the XML, starting from the 'sample' element.

create_tree_on_parent(tree, parent[, ...])

Creates a tree of parents in the XML, starting from the parent element.

delete_spectrum([spectra_id])

Deletes spectrum[spectra_id]

get_PIXE_file([spectra_id])

get_SIMS_data([spectra_id])

get_SIMS_particles(spectra_id)

get_all_spectra_filenames()

Gets the list with the names of all spectra

get_beam_energy([spectra_id])

Gets the beam energy and the FWHM in keV

get_beam_particles([spectra_id])

Gets the beam particles of spectrum[spectra_id = 0]

get_charge([spectra_id])

Gets the charge of the experiment

get_dataxy([spectra_id])

Gets the spectral data regarding spectrum[spectra_id].

get_detector([spectra_id])

Gets the detector solid angle

get_elements()

Gets the elements in the sample (see also self.set_elements())

get_elements_molecules_concentrations(...)

Deprecated, will be removed soon

get_energy_calibration([spectra_id, reaction_id])

Gets the energy calibration parameters.

get_geo_parameters([spectra_id])

Gets the entire set of parameters in a dictionary with the following format.

get_geometry_type([spectra_id])

Gets the experiment geometry along with the angles.

get_idf_text()

get_max_concentration(molecule_entry)

Gets the maximum concentration from the XML molecule entry.

get_max_depth(molecule_entry)

Gets the maximum element depth from the XML molecule entry.

get_max_thickness()

Gets the maximum possible thickness of the sample

get_min_concentration(molecule_entry)

Gets the minimum concentration from the XML molecule entry.

get_min_depth(molecule_entry)

Gets the minimum element depth from the XML molecule entry.

get_min_thickness()

Gets the minimum possible thickness of the sample

get_nelements()

Ĝets the number of elements in the sample

get_nlayers()

Gets the number of layers of the sample

get_notes()

get_number_of_simulations([spectra_id])

Gets the total number of simulations in spectrum[spectra_id].

get_number_of_spectra()

Gets the total number of spectra in the IDF file.

get_profile()

Gets the depth profile of the sample.

get_reactions([spectra_id])

Gets the reaction list of spectrum[spectra_id]

get_section(parent, keyword[, ...])

For internal use

get_simulation([spectra_id, simulation_id])

Gets the XML entry regarding simulation[simulation_id] of spectrum[spectra_ID].

get_spectrum([spectra_id])

Gets the XML entry regarding spectrum[spectra_ID].

get_spectrum_file_name([spectra_id])

Gets the name of the spectrum.

get_technique([spectra_id])

Gets the experimental technique of spectrum[spectra_id]

get_user()

Function to get the user's name from the IDF object.

load_pixe_data_from_file(file_name[, spectra_id])

print_idf_file([mode])

Prints the XML contents of the IDF file.

remove_nodes(parent, keyword)

Removes a XML node

remove_simulation_entry(spectra_id, ...)

Deletes simulation[spectra_id, simulation_id]

save_idf(filename)

Saves the IDF state into a file

set_SIMS_calibration(calibration_dic[, ...])

set_SIMS_data(data_list[, spectra_id])

set_SIMS_from_file(file_name[, ...])

set_beam_energy(energy[, spectra_id])

Sets the beam energy

set_beam_energy_spread(fwhm[, spectra_id])

Sets the FWHM of the beam

set_beam_particles(particle[, spectra_id])

Sets the beam particle of spectrum[spectra_id = 0]

set_charge(charge[, spectra_id])

Sets the charge

set_detector_solid_angle(angle[, spectra_id])

Sets the detector solid angle

set_elements(elements)

Sets the elements of the sample.

set_energy_calibration(m, b[, append, ...])

Set energy calibration assuming a linear relation between energy and channels:

set_energy_calibration_file(file_path[, ...])

Adds an energy calibration file to IDF.

set_exit_angle(angle[, spectra_id])

Sets the exit angle

set_geo_parameters(params[, spectra_id])

Sets the entire set of parameters to IDF from a dictioanry params (see also get_geo_parameters())

set_geometry_type(geometry_type[, spectra_id])

Sets the experiment geometry (IBM, Cornell, General)

set_incident_angle(angle[, spectra_id])

Sets the incident angle

set_max_thickness(value)

Sets the maximum possible thickness of the sample

set_min_thickness(value)

Sets the minimum thickness of the sample

set_note(note[, append])

Sets a note related to the the IDF file.

set_profile(profile_dic)

Sets the depth profile of the sample.

set_reactions(reactions_dic[, append, mode, ...])

Sets the reaction list associated with the chosen technique (see self.set_technique()).

set_reactions_list(reactions[, spectra_id])

Sets an entire list of reactions to the specified spectrum.

set_scattering_angle(angle[, spectra_id])

Sets the scattering angle

set_spectrum_data(data_x, data_y[, ...])

Sets the xx, yy data of spectrum[spectra_ID]

set_spectrum_data_from_file(file_name[, ...])

Read the spectrum data from the file and sets it on the IDF file.

set_spectrum_file_name(file_name[, spectra_id])

Sets the name of the spectrum for identification proposes (e.g plot legends)

set_technique(technique[, spectra_id])

Sets the experimental technique of the spectrum[spectra_id]

set_user(user)

unify_geo_parameters([master_id, target_id])

Copies the geometry parameters from one spectrum (with index master_id) to all other spectra in the IDF file.