InstituteforDiseaseModeling / EMOD-Generic-Scripts

Demonstration simulations using Generic-Ongoing branch of EMOD
1 stars 2 forks source link

Model measles nga01 #5

Closed krosenfeld-IDM closed 7 months ago

krosenfeld-IDM commented 7 months ago

I was getting an error for simulations that entered the SQL logging period (3 years):

Traceback (most recent call last):
  File "/mnt/idm2/home3/krosenfeld/MEAS-NGA-Base02_20240120_204014/a89/2d8/1fd/a892d81f-d4b7-ee11-aa0f-9440c9be2c51/./Assets/python/dtk_post_process.py", line 81, in application
    (inf_mo, tstamps) = np.histogram(gdata.data_vec_time,
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/py_env/lib/python3.11/site-packages/numpy/lib/histograms.py", line 778, in histogram
    a, weights = _ravel_and_check_weights(a, weights)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/py_env/lib/python3.11/site-packages/numpy/lib/histograms.py", line 297, in _ravel_and_check_weights
    raise ValueError(
ValueError: weights should have the same shape as a.
00:03:37 [0] [E] [Eradication] 

This pull request should fix that!

It also adds virtual environment folders to the .gitignore.