GetStimFiles not working, CCPI files missing
I am not able to get characteristics files, because - it seems to me - some CCPI files are missing. Why is the code trying to return them at all? Ahy are they missing? Because of that I can't get any other characteristics file. I give an example for 0015MIL but it happens for many more. It seems to me: 1) something is wrong with the CCPI code, @leilagin can you take a look? 2) maybe even if the CCPI file is missing GetStimNames could return other files? @jdl
How to reproduce:
In : import usefulFunctions as uf
In : ss = uf.getStimulationsForPatientCRF('0015MIL', 0)
In : import executor.scenario as s
In : import GetStimFiles
In : GetStimFiles.GetStimFiles(stim=ss, scenario_conf=x.SCENARIO_CONF)
StimulationMissingFile Traceback (most recent call last) in () ----> 1 GetStimFiles.GetStimFiles(stim=ss, scenario_conf=x.SCENARIO_CONF)
/home/maciekciment/ft_pipeline/GetStimFiles.py in GetStimFiles(stim, scenario_conf, checkFileExists, verbose, method, crfFiles, checkCCPIExists) 301 for f in allFiles : 302 if f == ccpiSeegFile and not checkCCPIExists : continue --> 303 if not os.path.exists( f ) : raise StimulationMissingFile( stim, f ) 304 305 if verbose :
StimulationMissingFile: - - /gin/data/database/04-processed/0015MIL/GroupAnalysis/CCPI_SPM_noThreshold/CCPI_0015MIL_2015-02-17.mat: File is missing
@jdl can you take a look and assign to Leila if needed?
It's an important one, CCPI is blocking access to good data.
yes, it is related to CCPI file missing , I didn't know how to put a condition so it does not throw and error (that is my lack of python knowledge!), so I kept the original file, just renamed it . An absolute silly way of doing it. I am open to correct it if you give me some hint though. But for the mean time you can use below to get the characteristic files.
In : import GetStimFilesnoCCPI
In : GetStimFilesnoCCPI.GetStimFilesnoCCPI(stim=ss,scenario_conf=s.SCENARIO_CONF)
With the flag it works. @jdl: can you set it to False by default?