Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools/BackPopulateSNRAndAcquisitionOrder.pl #1080

Open
2 of 3 tasks
cmadjar opened this issue Apr 5, 2024 · 0 comments
Open
2 of 3 tasks

tools/BackPopulateSNRAndAcquisitionOrder.pl #1080

cmadjar opened this issue Apr 5, 2024 · 0 comments
Assignees

Comments

@cmadjar
Copy link
Collaborator

cmadjar commented Apr 5, 2024

  • run perl BackPopulateSNRAndAcquisitionOrder.pl -h and ensure the help of the script is up to date
  • pick a tarchive ID and delete SNR parameter_file entries and set AcqOrderPerModality field of the files table to NULL. Example for tarchive ID 27:
    UPDATE files SET AcqOrderPerModality=NULL WHERE TarchiveSource=27;
    UPDATE parameter_file SET Value=NULL WHERE FileID IN (SELECT FileID FROM files WHERE  TarchiveSource=27) AND ParameterTypeID=(SELECT ParameterTypeID FROM parameter_type WHERE Name='SNR');
    
    mysql> SELECT TarchiveSource, SessionID, AcqOrderPerModality, Value FROM files JOIN parameter_file USING (FileID) JOIN parameter_type USING (ParameterTypeID) WHERE Name='SNR' AND TarchiveSource=27;
     +----------------+-----------+---------------------+-------+
     | TarchiveSource | SessionID | AcqOrderPerModality | Value | 
     +----------------+-----------+---------------------+-------+
     |             27 |      1053 |                NULL | NULL  |
     |             27 |      1053 |                NULL | NULL  | 
     +----------------+-----------+---------------------+-------+
    
  • run perl BackPopulateSNRAndAcquisitionOrder.pl -profile prod -tarchive_id 27 and check that the AcqOrderPerModality and SNR value have been repopulated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants