analyse_servo.git
11 months agoImprove detect_change function
Lukáš Jiřiště [Wed, 11 Dec 2024 09:55:54 +0000 (10:55 +0100)]
Improve detect_change function

Opening the valve to cell in two stages introduced a problem with
the peak detection (double peaks).
For small pressures during desorption measurement the pressure
differences were also small and the threshold could not be set so that
it recognizes these small peaks without triggering the double peaks.

Both seem to be somewhat solved by what I've done. The differences are
divided by the mean of differences 15 (arbitrary) sample to both sides.
This amplifies the peaks that occur around vacuum much more than others.
In other words the difference function is divided by the convolution of
differences and a rectangular window (of size 30).

The convolution looks like exponentials that roughly follow the
pressure that have smeared peaks. By dividing the differences by this
convolution, the small peaks are divided by small values while the big
peaks are divided by greater values. This maybe worsens the
noise-to-signal ratio, but makes the peaks easier to process.

11 months agoRename volume variable for more clarity
Lukáš Jiřiště [Wed, 11 Dec 2024 09:54:00 +0000 (10:54 +0100)]
Rename volume variable for more clarity

12 months agoEnable processing of desorption
Lukáš Jiřiště [Tue, 3 Dec 2024 14:44:57 +0000 (15:44 +0100)]
Enable processing of desorption

This change makes the changes detection a little dumber, because the
change direction cannot be used to differentiate. So now the
odd-numbered changes are assumed filling (vacuuming) and the
even-numbered changes are assumed to be connections to the cell.

18 months agoMinor changes to process_experiment
Lukáš Jiřiště [Mon, 20 May 2024 14:10:25 +0000 (16:10 +0200)]
Minor changes to process_experiment

This function was quite high level so it only needed minor changes.
It now calculates the "start" pressure - the pressure after opening
the valve (which marks start of the sorption experiment cycle).

18 months agoModify get_important_pressure
Lukáš Jiřiště [Mon, 20 May 2024 14:07:22 +0000 (16:07 +0200)]
Modify get_important_pressure

This function now handles the correct experiment.

18 months agoChange detect_open to detect_change
Lukáš Jiřiště [Mon, 20 May 2024 14:03:21 +0000 (16:03 +0200)]
Change detect_open to detect_change

Positive threshold behaves the same way it behaved before.
With negative threshold the function only detects values (derivatives)
lower (bigger in absolute value) than that.

18 months agoChange pseudo_exp.m so it is closer to real data
Lukáš Jiřiště [Mon, 20 May 2024 13:59:31 +0000 (15:59 +0200)]
Change pseudo_exp.m so it is closer to real data

The data was meassured in a different way to what I assumed hence the
pseudo experimental data were not that similar to the real data.
This commit changes the pseudo_exp function so it mimics the experiment
much more closely.

18 months agoImplement process_experiment function
Lukáš Jiřiště [Tue, 14 May 2024 13:01:33 +0000 (15:01 +0200)]
Implement process_experiment function

This function accepts the pressure-time dependence along with other
important characteristics of the aparature (volumes, temperature).

It also optionally accepts the pressure of V1 which is then used to
get a more precise value for the pressure after connecting V1 to V2.

18 months agoImplement the get_important_pressure function
Lukáš Jiřiště [Tue, 14 May 2024 12:27:25 +0000 (14:27 +0200)]
Implement the get_important_pressure function

This function reduces the input data to only the starting and
equilibrium pressures of each "cycle".

18 months agoImplement better generation of pseudo exp. data
Lukáš Jiřiště [Mon, 13 May 2024 07:21:49 +0000 (09:21 +0200)]
Implement better generation of pseudo exp. data

18 months agoAdd the function detect_open
Lukáš Jiřiště [Tue, 7 May 2024 14:00:30 +0000 (16:00 +0200)]
Add the function detect_open

This function returns an array of logicals, where the value is true only
at the index, which corresponds with the time the valve only just opened.
It should work like this:
  t(detect_open(t, p)) = t_when_valve_opened

18 months agoAdd a function that generates pseudo experiment
Lukáš Jiřiště [Tue, 7 May 2024 13:51:28 +0000 (15:51 +0200)]
Add a function that generates pseudo experiment

I add this function to generate data that is qualitatively similar to
the data produced by the experiment. The real data may prove more
difficult, but the structure of the processing should be the same.