-
Notifications
You must be signed in to change notification settings - Fork 8
repeated call of spec4anything for a file will add create repeat entries #179
Comments
You can overwrite. This requires a few things:
The problem is that
I don't think
For the same reasons adding An alternative could be to change the Edit: In addition, with such a change the default value for that |
I missed the flag However, I don't think the current (implicit) design is a good idea, despite seeing where it's coming from. Specifically, for the following reason: In the current version, hirni does not seem to have an intended workflow for sessions, where no imaging data had been collected. This might, for example, happen in multi-session studies where only on some days MRI data are acquired, but additional behavioral data gets collected on other days (I'm actively involved in at least one such project atm..). Also for those kind of projects, I would want to first dump all the raw data into However, since no But this goes against the "add each acquisition/session into one folder" mentality, which I implicitly assumed when populating sourcedata. My hunch is that Now, I understand that one file/location might need to be processed by multiple converters. However, from what I can see, no such default converters exist currently in hirni. That is, none are able to selectively process a portion of a [In a sense, this is what I already do for the behavioral-logfile converter for my other 2 session project: I have a zipfile for both sessions, and my script checks for it's content and triggers one or the other converter of the matlab logfiles, depending what content the zipfile has (e.g. 10 runs on day1, but only 4 on day2). but I call only one converter from the specs.] Or have I misunderstood something fundamentally here? Related to the intended workflow: is anyone actually using the In any case, since the |
It is not clear to me, what isn't working (well) for you in such a case. Trying with just some dummy doesn't show any issue to me:
Need to double-check, but to me that sounds more like |
Agree - this is the intended way of thinking about it. |
Overall it seems to me, that the trouble arises from the (perceived?) need to create a skeleton specfile. There may well be issues with |
Ok, I see your "skeleton spec" point. That was a misconception on my side. I guess the issue I have stems from the folloing: dicom-tarfiles and any other raw files are treated by hirni completely differently.
Importantly, adding the dict of the events file inherits some parts (e.g. subject) from the preceding entries in the specs. However, no cli arguments of
And returning to the original issue of replacing entries
Then Note that in my case, there could be a simple check whether the proposed new entry matches any existing one (the lines are identical in my case, I think, or at least in any deterministic part they are) and simply not add it then. |
Ok - I see your convenience points and the relation to what
Yes, you would need to put the entire JSON dict together instead of specifying single properties separatly. I agree that this is not particularly convenient via command line (although/because it is more flexible). Note, however, that you can generate that dict by any means you have and write it to file to be passed to Here I want to edit specfiles in order to not convert image series that aren't motion corrected (for studyforrest):
This is then called from within a shell script (that does more than that, of course) running in the study dataset:
So, if you use However, as I said above: I see the point and I'll have a closer look on how to change or add a command that covers what you outlined. |
As intended, calling
datalad hirni-spec4anything
to add a new file (behavioral logfile) to an existing spec creates an new entry of typeevents_file
.However, simply repeating the call again, creates another entry with the same values below, creating a duplicate.
Instead, it should overwrite any settings, like a repeated call to
dicom2specs
does.I guess that a simple search by
{{location}}
should be enough to identify whether an entry already exists in the specs or not, but am note sure about that..The text was updated successfully, but these errors were encountered: