@@ -19,13 +19,15 @@ cd pcpostprocess
1919Create and activate a virtual environment.
2020
2121``` sh
22- python3 -m venv .venv && source .venv/bin/activate
22+ python3 -m venv .venv
23+ source .venv/bin/activate
2324```
2425
2526Then install the package with ` pip ` .
2627
2728``` sh
28- python3 -m pip install --upgrade pip && python3 -m pip install -e .' [test]'
29+ python3 -m pip install --upgrade pip
30+ python3 -m pip install -e .' [test]'
2931```
3032
3133To run the tests you must first download some test data.
@@ -111,3 +113,138 @@ options:
111113 --log_level LOG_LEVEL
112114` ` `
113115
116+ # # Example: Running on test data
117+
118+ Once the tests have completed, you can try out the program on the downloaded test data.
119+
120+ This data is organised as follows:
121+
122+ ` ` `
123+ 13112023_MW2_FF
124+ | - StaircaseInStaircaseramp (2)_2kHz_15.01.51
125+ | - StaircaseInStaircaseramp (2)_2kHz_15.12.17
126+ | - staircaseramp (2)_2kHz_15.01.07
127+ | - staircaseramp (2)_2kHz_15.06.53
128+ | - staircaseramp (2)_2kHz_15.11.33
129+ | - staircaseramp (2)_2kHz_15.17.19
130+ | - export_config.py
131+ ` ` `
132+
133+ To make sense of this data set, pcpostprocess requires the file ` export_config.py` to be present.
134+ For the example data, this contains
135+
136+ ` ` `
137+ #
138+ # Config for export
139+ #
140+
141+ # Copy this config file to the main directory of data
142+
143+ # E.g. path to the main directory of data
144+ # /run/media/cholei/Chon/Adam_Syncropatch_May_2019/20190314MPAN
145+
146+ # Data output directory
147+ savedir = ' ./data'
148+
149+ # Save name for this set of data
150+ saveID = ' 13112023_MW2'
151+
152+ # DataControl384 protocol output names to shorter names
153+ # For QC only
154+ D2S_QC = {
155+ ' staircaseramp (2)_2kHz' : ' staircaseramp'
156+ }
157+
158+ # For export only
159+ D2S = {
160+ ' staircaseramp (2)_2kHz' : ' staircaseramp' ,
161+ ' staircaseramp1' : ' staircaseramp1' ,
162+ ' staircaseramp2' : ' staircaseramp2' ,
163+ ' StaircaseInStaircaseramp' : ' sis' ,
164+ ' hhbrute3gstep' : ' hhbrute3gstep' ,
165+ ' hhsobol3step' : ' hhsobol3step' ,
166+ ' wangbrute3gstep' : ' wangbrute3gstep' ,
167+ ' wangsobol3step' : ' wangsobol3step' ,
168+ ' longAPs (2)' : ' longap' ,
169+ ' StaircaseInStaircaserampInverse' : ' sisi' ,
170+ ' squarewave' : ' squarewave' ,
171+ ' maxdiff' : ' maxdiff' ,
172+ # 'ManualPhasPlaneExploration': 'manualppx',
173+ ' random-t-optimised-v' : ' rtov' ,
174+ ' random-v-optimised-t' : ' rvot' ,
175+ ' SpaceFillingProtocol10' : ' spacefill10' ,
176+ ' SpaceFillingProtocol19' : ' spacefill19' ,
177+ ' SpaceFillingProtocol26' : ' spacefill26' ,
178+ ' StaircaseInStaircaseramp' : ' sis'
179+ }
180+
181+ # I-V like protocols, their format so is, different need to be treated in
182+ # slightly different way
183+ IVProtocolList = [
184+ ]
185+
186+ # Protocols that have been run twice (most probably for stability check)
187+ # Note that not repeats within the same 'protocol'
188+ RepeatedProtocolList = [
189+ ' staircaseramp1' ,
190+ ' staircaseramp2' ,
191+ ' sis' ,
192+ ' hhbrute3gstep' ,
193+ ' hhsobol3step' ,
194+ ' wangbrute3gstep' ,
195+ ' wangsobol3step' ,
196+ ' longap' ,
197+ ' sisi' ,
198+ ' squarewave' ,
199+ ' maxdiff' ,
200+ ' manualppx' ,
201+ ' rvot' ,
202+ ' rtov' ,
203+ ' spacefill10' ,
204+ ' spacefill19' ,
205+ ' spacefill26' ,
206+ ' sis'
207+ ]
208+ ` ` `
209+
210+
211+ Instead of running on all wells (which takes about an hour to complete), we' ll run on just two wells:
212+ ```
213+ pcpostprocess run_herg_qc ./tests/test_data/13112023_MW2_FF/ -w A02 A03
214+ ```
215+ This should take around 5 minutes to run, and produce the following output
216+ output
217+ |- hergqc
218+ |- 13112023_MW2-staircaseramp_2-leak_fit-after
219+ |- 13112023_MW2-staircaseramp_2-leak_fit-before
220+ |- 13112023_MW2-staircaseramp-leak_fit-after
221+ |- 13112023_MW2-staircaseramp-leak_fit-before
222+ |- debug
223+ |- leak_correction
224+ |- output
225+ |- reversal_plots
226+ |- subtraction_plots
227+ |- traces
228+ |- A02-sweep0-after.png
229+ |- A02-sweep0-before.png
230+ |- A02-sweep1-after.png
231+ |- A02-sweep1-before.png
232+ |- A03-sweep0-after.png
233+ |- A03-sweep0-before.png
234+ |- A03-sweep1-after.png
235+ |- A03-sweep1-before.png
236+ |- chrono.txt
237+ |- info.txt
238+ |- passed_wells.txt
239+ |- QC-13112023_MW2.csv
240+ |- QC-13112023_MW2.json
241+ |- qc_table.tex
242+ |- qc_table.xlsx
243+ |- qc_vals_df.csv
244+ |- selected-13112023_MW2.txt
245+ |- selected-13112023_MW2-staircaseramp.txt
246+ |- selected-13112023_MW2-staircaseramp_2.txt
247+ |- subtraction_qc.csv
248+ ```
249+
250+ Here ...
0 commit comments