46 Commits (98dcf3b7a317f09f7c437bb927697dc4de0e18f6)
 

Author SHA1 Message Date
Taha Ahmed 98dcf3b7a3 Updated to reflect change (long time ago) in folder structure. 13 years ago
Taha Ahmed f0ed360c0d Ok, no commits since a while. Last change was remake of init.R to improve readability. 13 years ago
Taha Ahmed 70c39b9145 xrdpkWrapper.R now correctly handles situations where file already exists,
override = TRUE, and run > 1. Previously only the latest run was actually saved,
although the created list had the right length.
Works correctly and as intended now, as far as I can tell.
13 years ago
Taha Ahmed 3d4244f1fd Added XRD peak wrapper functions (as done previously for XRF and Raman).
Also put the short R-data loading function I wrote into the
common directory.
13 years ago
Taha Ahmed 0579b5ea52 Many small changes and updates. Need separate git repo for each instrument. 13 years ago
Taha Ahmed beab0b9e64 Solved the issue with repeating diffractometry analyses by wrapper functions.
Caught some errors and made some improvements in the other functions.
13 years ago
Taha Ahmed 4fff82be0c Complete re-write of tifftags2df (only internal changes).
No changes in input or output of this function, only of the internal
mechanism with which tags are chosen and formatted for output.
init.R contains the sourceDir() function which is necessary for sourcing
all .R files in a directory.
13 years ago
Taha Ahmed b55af5d478 Re-wrote muxd2df() from scratch.
To make it able to include parameters as well as data in the returned df.
muxd2df() now works satisfactorily, outputs parameters such as steptime,
theta, and cps as well as thth and counts.
Other minor changes mostly updates of source file pointers.
14 years ago
Taha Ahmed b976bd3fa4 Split all files into their separate functions, put each former file in a directory.
The idea is to better expose each function, since some functions tended
to drown in the larger files.
Note that dependecies are are not resolved yet.
Many functions are probably broken right now, especially those who point
to common.R.
14 years ago
Taha Ahmed f12fe6306c Added empirical_formula to attributes of pdf2df().
Since chemicalformula can be quite a mess for some PDFs.
14 years ago
Taha Ahmed ed1853b706 Changed from factors to strings in pdf2df().
Added stringsAsFactors = FALSE to dataframe.
14 years ago
Taha Ahmed 52adff796b Added ocp2df() function to AUTOLAB.R.
ocp2df() is a straight-forward, no-frills function.
14 years ago
Taha Ahmed 77fd0b5aef Renamed chronoamp2df() to amp2df(). Added stringsAsFactors.
Renamed because the technique I have used so far is regular amperometry,
not chronoamperometry. Whatever the distinction is, I am not really sure.
Anyway, this function corresponds to the amperometry2df() function for CHI760.
14 years ago
Taha Ahmed ab65adee9d Fixed the problem with multiple-potential steps in mps2df(). 14 years ago
Taha Ahmed e6eb2b9544 Created the chronoamp function for AUTOLAB.
Small changes in the chronoamp2df() for CHI.
14 years ago
Taha Ahmed 8e7eb9e9b1 In chronoamp2df(), changed the naming for the two "step" parameters.
This way, it should be more clear which is the dynamic counter, and which
is the static counter.
Also removed factor() around the dynamic step counter.
14 years ago
Taha Ahmed e3a7e20ff8 Updated chronoamp2df() to the new attributes system. Also improved docs. 14 years ago
Taha Ahmed b687e77eb5 ConvertRefPot() now handles AVS scale too. 14 years ago
Taha Ahmed 1d0dd666b0 Moved baseline args gam and scl.factor to Ramanpk() function arg. 14 years ago
Taha Ahmed 6a312409c3 Removed re-calc to evenly spaced shift from Raman2df().
The first test showed that such an approach would not work
(see comment in Raman2df()).
14 years ago
Taha Ahmed 9d67dbfad2 Raman2df() now includes evenly spaced spectrum in return dataframe.
It appears this will be such a common operation that it is worth
including in the fetch function itself.
14 years ago
Taha Ahmed aadd16e605 Raman spectrum are now sorted by increasing Raman shift by Raman2df().
INCA.R deals with EDS data.
Minor updates to CHI.R (check the diff logs for details).
14 years ago
Taha Ahmed 2287b7f57f Updated lsv2df(). Now includes attributes in dataframe columns.
Added calculation of charge density.
Also updated the description.
14 years ago
Taha Ahmed 0f936f1e62 Updated ocp2df() in CHI.R to put attributes in the dataframe columns. 14 years ago
Taha Ahmed bd2b1731fc Major update in CHI.R, function amperometry2df() improved, fixed.
There was an error in amperometry2df(), whereby the timediff calculated
was way too low. Was possibly related to the It2charge() function
used to calculate those values. That function (in common.R) is no longer
used by amperometry2df().
Also updated amperometry2df() so it now includes the data attributes
in the return dataframe itself, as columns (compare cv2df()).

common.R: do not use the It2charge() function in the future.
Do such calculations inline instead.
14 years ago
Taha Ahmed fd62a103c8 Created LEO1550.R: created tifftags2df() function.
In common.R: marked LinearBaseline() as deprecated.
14 years ago
Taha Ahmed 8e0733d03e Added function LinearBaseline(). 14 years ago
Taha Ahmed fa6ac99fa5 Changed attribute name Segment to Segments (stores no of segments).
Because we already have the counter "segment", which stores the
current segment (so for Segments = 10, segment = 1:10).
14 years ago
Taha Ahmed 2790047c3a Major update to cv2df(). Removed df attributes, built-into df instead.
Be advised: This change will break all old reports that used the cv2df() function.
Experimental information (potential limits, scanspeeds, etc.) are now added to the
return dataframe as columns instead of attributes.
With this information built-in to the dataframe, analysis is simplified using melt
and cast and other grouping functions.
14 years ago
Taha Ahmed 2c48474584 Added the new function int2padstr().
Using a combination of format() and gsub().
The purpose is to simplify looping through many datafiles
in a single report using for-loops.
A way was needed to "convert" the for-loop's counting variable
into a string of set length padded with zeroes.
This function fills that need.
14 years ago
Taha Ahmed c810ef66ba Updated It2charge() and fixed the relevant parts of amperometry2df().
It2charge() is now explicitly meant to be used only from within
other functions, such as amperometry2df().
14 years ago
Taha Ahmed f8ad854bd7 New function It2charge() in common.R - amperometry2df() updated accordingly. 14 years ago
Taha Ahmed 1dc00af759 Updated all functions to use the new ProvideSampleId() function. 14 years ago
Taha Ahmed 6469feb7be Created the new function ProvideSampleId(). 14 years ago
Taha Ahmed 74450ff30c Most recent change: added working electrode area to electrochemical functions. 14 years ago
Taha Ahmed 64774c079e Added the function Raman2df().
Note: There should be a possibility to supply (as an argument to
Raman2df()) a custom sampleid which should then override the regexp-
based algorithm (only if that argument was supplied).
14 years ago
Taha Ahmed 3483065be8 Started working on a Cu Ka2 elimination algorithm.
Based on the paper by Dong et al.
I call the function EliminateKa2().
14 years ago
Taha Ahmed dbb69a150a Corrected syntax error in previous commit. Now it works as expected. 14 years ago
Taha Ahmed 4131c28dcc cv2df() now includes cycles as well as segments in the returned df. 14 years ago
Taha Ahmed b5d305bc73 Added function ocp2df() in CHI.R 14 years ago
Taha Ahmed eb9d5d2dd7 Added function ConvertRefPot().
Function takes a potential and its reference electrode, and converts to a specified reference electrode scale, either another or the same.
I made it to simplify converting between different reference electrode scales in running text.
14 years ago
Taha Ahmed 100afe81af Added the functions chronocm2df(), chronoamp2df(), and amperometry2df().
All of them based on the previous functions. Note: Changed regexp to match
also numbers in scientific notation.
14 years ago
Taha Ahmed 5a5f3133d3 Two new functions in common.R
Celsius2Kelvin()
Kelvin2Celsius()

Including very crude error checks (checks that supplied temperature
is not below absolute zero, if so, sets it to absolute zero).
Idea: would be nice if function returned same number of significant
digits as it received.
14 years ago
Taha Ahmed 0f6eebe463 Added function lsv2df() to read Linear Scan data.
Essentially copy-paste of cv2df(), just changed the attributes part.
14 years ago
Taha Ahmed f87e3b2a42 Function cv2df that accurately reads CV files into dataframe together with CV attributes.
Function works as far as I have tested.
14 years ago
Taha Ahmed 996a79787c Contains my own R functions. First commit. 14 years ago