Siemens IMA with oversampling

Hi all,

I’m processing some Siemens ima data that has not had oversampling removed, which seems to confuse both Tarquin and Osprey.

For Osprey, the following hack (in io_loadspec_dicom.m) avoids errors and incorrect spectral width:
fids = zeros(DicomHeader.vectorSize*2,length(filesInFolder)); % MJT HACK
dwelltime = DicomHeader.dwellTime * 1e-9 * 1; % MJT HACK
(basically, I’m overriding the logic that detects oversampling removal)

For Tarquin, I copied and modified the ima files using python:
data_ws = ‘./svs.dcm’
data_ws_mod = ‘./svs_mod.dcm’
with open(data_ws,“rb”) as f:
s=f.read()
f.close()
assert s.find(b’sRXSPEC.alDwellTime[0] = 250000’) != -1 # check that dwell time is found and as expected
s=s.replace(b’sRXSPEC.alDwellTime[0] = 250000’,b’sRXSPEC.alDwellTime[0] = 125000’)
with open(data_ws_mod,“wb”) as f:
f.write(s)
(Correcting the sampling frequency via the GUI also works, but it didn’t work as a command line option.)

Sharing this in case it’s useful to users or developers.

Michael

excuse me,professor,i wanna query that how many .ima files in your folder.
it seems that we have encountered the same question

Hello Gao. I’m afraid I don’t remember how many files were in the folder. The main issue was ensuring the software used the appropriate dwell time/spectral width, otherwise the time/chemical shift scales are wrong and the spectral fitting fails.

thx for your reply,i got a question with my IMA files,hhh