LyoHUB / LyoPRONTO

Open-Source Lyophilization Process Optimization Tool
GNU General Public License v3.0
3 stars 2 forks source link

Using experimental Tp measurements through file to compute Rp gives error #1

Open alopezdr opened 1 year ago

alopezdr commented 1 year ago

Hi,

I am testing the LyoPRONTO package and I am having issues trying to use the experimental product temperature measurements fed through a file to compute Rp in the Primary Drying Calculator. My simulation parameters are the following:

simulation parameters: sim = dict([('tool','Primary Drying Calculator'),('Kv_known','Y'),('Rp_known','N'),('Variable_Pch','N'),('Variable_Tsh','N')])

I am running the script with all the default values of the parameters, since this is a test.

When running the script, I keep getting this error:

File "XX\LyoPRONTO_v1.0\code\calc_unknownRp.py", line 64, in dry
    output_saved =np.array([[t, float(Tsub), Tbot_exp[iStep], Tsh, Pch*constant.Torr_to_mTorr, dmdt/(vial['Ap']*constant.cm_To_m**2), percent_dried]])

ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 2 dimensions. The detected shape was (1, 7) + inhomogeneous part.

I thought it might be because I was not correctly formatting of the temperature.dat file, so I downloaded the one provided as an example in the GUI (http://lyopronto.rcac.purdue.edu/) and changed its name from temperature.txt to temperature.dat. The same error message appears.

Since I am working with the code directly downloaded from the Google Drive link provided in the Alexeenko Research Team website, I thought it might be an issue with the code version. However, if I try to run the same test on the GUI, I also get an error message:

image

It could be that the GUI is having the same issue as the code (some bug in the calc_unknownRp.dry function) or that I am doing something wrong at a very basic level. Could you please help me?

Ickaser commented 6 months ago

Sorry never to get back to you--I thought I would automatically get a notification about issues as the main manager of the repo, but apparently not.

You're not crazy--this is an issue with the existing code base, possibly due to updates in scipy.optimize.fsolve since this was originally published in 2019.

I recently revived the web version at a slightly changed URL (https://lyopronto.geddes.rcac.purdue.edu/) , and in my debugging process encountered the same issue and resolved it, so it should be fixed in the web version as of now.

I plan to make some updates to this code base in the near future, and this will be a first priority, but the web version can help in the meantime (since my PhD work may keep me busy).