Skip to content
Create function files_init authored by Antoine Schnepf's avatar Antoine Schnepf
**`files_init`**`(input_parameter_names, input_parameter_values, input_file_name="In_Pulses.txt", output_file_name="Output.txt", path="")`
This function overwrites the In_Pulse.txt with new parameters and a fresh Nit (numbering of iterations) of 1.
It also creates a new blank file Output.txt for Alice to write results in.
**parameters :**
- **`input_parameter_names`** : _list of strings_. The name of the parameters of the experiment.
- **`input_parameter_values`** : _list of floats_. The values of the parameters.
- **`input_file_name`**: _str, optional_. By default : "In_Pulses.txt"
- **`output_file_name`**: _str;optional_. By default : "Output.txt"
- **`path`**: __str, optinal_. The path for the directory where the files should be created.
**examples :**
```
>>> files_init(['Windfreak ramp duration',
'Thorlabs stage pos.',
'Thorlabs stage acceleration',
'Thorlabs transport time','LDT power'],
[1.91,
3.78,
1.96,
1.43,
1.37])
```
this creates the folowing Input.txt file :
```
Nit V_Windfreak ramp duration V_Thorlabs stage pos. V_Thorlabs stage acceleration V_Thorlabs transport time V_LDT power
1
1.91
3.78
1.96
1.43
1.37
```
\ No newline at end of file