![]() ![]() endswith ( 'pxp' ): raise RuntimeError ( 'No iolite 3 experiment open?' ) # Load that pxp using the igor python module: d = packed. Hutchinson, Transactions on Mathematical Software 12, and it is this algorithm on which iolite 4's automatic spline is based.įrom igor import packed import numpy as np import matplotlib.pyplot as plt # Specify the group and channel to check: group_name = 'G_NIST612' channel_name = 'Fe57' # Figure out which pxp was imported into iolite 4: f = data. One adaptation of this algorithm that also adds generalized cross validation for the automatic choice of smoothing parameter was published in "Algorithm 642: A fast procedure for calculating minimum cross-validation cubic smoothing splines", M.F. It turns out that this algorithm is quite popular (> 2500 citations!). Hoping to keep our splining relatively consistent from iolite 3 to 4, especially the automatic spline, this algorithm seemed like a good place to start. Reinsch, Numerische Mathematik 10, but it also had some iolite special sauce. Scanning the Igor Pro documentation regarding smoothing splines, one can discover that their implementation is based on "Smoothing by Spline Functions", Christian H. We wanted to recreate that functionality in iolite 4, but since we no longer have access to Igor Pro's fitting functions we had to go back to the drawing board. iolite 3's automatic spline was very good at providing a smooth but not too smooth representation of our data. In order to get accurate results we must have an accurate representation of how our backgrounds and sensitivities are evolving with time. The format generally looks like:Ĭurve fitting plays an import role in iolite's data reduction pipeline. As an example for the latter scenario, let's look at the files available for SciPy. Python packages that are not pure python are a bit tricker and require you to know which version of python you are using (version 3.6 is embedded in iolite at the time of writing but may change in the future) and which operating system / architecture you are using. Python packages that are pure python (no machine/operating system specific code) are easy and will normally be provided as a single. This is where we encounter the first possible complication. You would start by searching for the package, clicking the Download files link on the left side under Navigation and downloading the appropriate file for your operating system and python version. Typically the Python Package Index is the best place to start if you know which package you're looking for. If your great idea depends on additional python packages that we do not include, here is a quick overview of one way you can install those packages. Iolite comes with many useful python packages, but we cannot anticipate everything our users might want to use python for in iolite. See here for more info, but it is essentially the number of seconds since 00:00:00.000 UTC. Also note that time in iolite is stored as "time since epoch" in seconds. Note that now my downsample_for_export function returns a tuple of time and data so that the downsampled time can be used for plotting purposes. to_excel ( filename, index = False, sheet_name = "Downsampled data" ) from_items ( zip ( columns, data_ds )) df. ![]() timeSeriesList (): t_ds, d_ds = downsample_for_export ( channel, tpoint ) if not data_ds : data_ds. getDouble ( None, "Time per point", "Time per point", 1 ) columns = data_ds = for channel in data. reshape ( - 1, n ), 1 )) tpoint = QInputDialog. mean () n = int ( time_per_point / tdelta ) end = n * int ( len ( d ) / n ) return ( np. Import numpy as np import pandas as pd from iolite.QtGui import QFileDialog, QInputDialog def downsample_for_export ( channel, time_per_point ): d = channel.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |