![]() The exact data range can be set by entering in the following command into Fityk's command line (located at the bottom of the main Fityk UI). Left clicking and dragging will re-select data points. Click on the Data-Range Mode icon and then right click and drag to unselect regions of the spectrum. Set active region of datasetÄetermine the active region of the spectrum that needs to be fit. Lines 2-5 will read similar to A = (x > 450 and x 450 and x 450 and x Load File). fit session from the previous series, after loading in the initial spectrum. Note: If the spectral series is similar to a previous dataset that has already been analyzed using this technique, much of the steps can be replaced by simply opening the generated script_sample.fit file in a text editor and copy/pasting lines 2-5 of that script into a previous saved. Also, there should probably not be any spaces elsewhere in the filename, try to use underscores instead of spaces. There should be a space between the filename and the numeric index as Python uses the space for parsing the filenames, though this can obviously be changed to another character by editing the python code. ![]() File naming conventionÄata files should be space- or comma-delimted txt files in the following format: spectra_name 000001.txt These instructions will detail, in rough order, the steps needed to complete the iterative spectral fitting with Fityk and these Python scripts. Version 2 does not include the graphic capabilities, and thus does not require some of the additional python packages necessary for plotting. It will also create graphs for the center, FWHM, intensity, and calibrated intensity. It will output individual space delimited txt files for each peak. This python script will parse the peak data output by Fityk when running the generated Fityk script. This output txt file can be parsed using the peaks.py script. The generated Fityk script will create a space delimited text file that contains all the peak parameters and uncertainties for each spectrum. The first spectrum in the series needs to be manually fit initially using Fityk, to create the desired peaks, and to determine the appropriate background, if any, that should be subtracted from each spectrum. ![]() This generated text file will be of the form _script_sample_name.fit This python script will generate a text file that can be executed as a script by Fityk which will open up, fit, and output parameters of a series of space delimited spectra. The scripts will assist in fitting and analyzing large amounts of spectra acquired from the same sample or something that where the expected Spectrum changes gradually, such as a linescane or a temperature-dependent experiment. These scripts are compatible with Fityk 0.9.8. These are a series of python 2.7 scripts that make use of the wonderful fitting software, Fityk, which has an available 0.9.8 version for free, written by Marcin Wojdyr. Iterative Spectral Fitting with Fityk and Python
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |