I am trying to find the equivalent function of idl's journal in python (or ipython). I know ipython has the %logstart function but that only record the input/output in ipython, so if I run my script and it asks me to input values, these don't get into the log. To make it clear here is my terminal when I run the EELTnoM6.py script:
In [11]: run EELTnoM6
################################################################
## STOKES vector after the system ##
################################################################
== Demodulation matrix ==
Automatic: A
ZIMPOL/EELT: Z
EELT IF Eif
Custom C
Demodulation matrix?: C
Efficiency of the detector?: 1.
Demodulation matrix? (e.g. [ [1.,0.],[0.,1.] ]): [[1/6.,1/6.,1/6.,1/6.,1/6.,1/6.], [0.5,-0.5,0.,0.,0.,0.],[0.,0.,-0.5,0.5,0.,0.],[0.,0.,0.,0.,-0.5,0.5]]
ModelStokesMeasurement time = 65.6509261131
Simulation time = 151.731481075
and here is what I get in the log:
# IPython log file
%logstart -o -r EELTnoM6_log rotate
ls
%logstop
run EELTnoM6
%logoff
I would like to store in the log the inputs that I give when the script asks, i.e.
Demodulation matrix?: C
Efficiency of the detector?: 1.
Demodulation matrix? (e.g. [ [1.,0.],[0.,1.] ]): [[1/6.,1/6.,1/6.,1/6.,1/6.,1/6.],[0.5,-0.5,0.,0.,0.,0.],[0.,0.,-0.5,0.5,0.,0.],[0.,0.,0.,0.,-0.5,0.5]]
So C, 1. and the matrix to be able to run it again with the same values. This is extremely easy in IDl so I was very surprised when I couldn't find the same for ipython...