Skip to content

Commit

Permalink
Adds input data to registry
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Teves committed Dec 6, 2022
1 parent 9d22468 commit c7349bd
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tedana/resources/config/outputs.json
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,10 @@
"orig": "ica_orth_mixing",
"bidsv1.5.0": "desc-ICAOrth_mixing"
},
"input img": {
"orig": "raw_echo-{echo}",
"bidsv1.5.0": "echo-{echo}_desc-TedanaInput"
},
"registry json": {
"orig": "registry",
"bidsv1.5.0": "desc-tedana_registry"
Expand Down
3 changes: 3 additions & 0 deletions tedana/tests/data/cornell_three_echo_outputs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ desc-optcomAccepted_bold.nii.gz
desc-optcomDenoised_bold.nii.gz
desc-optcomRejected_bold.nii.gz
desc-optcom_bold.nii.gz
echo-1_desc-TedanaInput.nii.gz
echo-2_desc-TedanaInput.nii.gz
echo-3_desc-TedanaInput.nii.gz
figures
figures/carpet_optcom.svg
figures/carpet_denoised.svg
Expand Down
4 changes: 4 additions & 0 deletions tedana/tests/data/fiu_four_echo_outputs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ echo-1_desc-ICA_components.nii.gz
echo-1_desc-PCAT2ModelPredictions_components.nii.gz
echo-1_desc-PCAS0ModelPredictions_components.nii.gz
echo-1_desc-PCA_components.nii.gz
echo-1_desc-TedanaInput.nii.gz
echo-1_desc-Rejected_bold.nii.gz
echo-2_desc-Accepted_bold.nii.gz
echo-2_desc-Denoised_bold.nii.gz
Expand All @@ -59,6 +60,7 @@ echo-2_desc-PCAT2ModelPredictions_components.nii.gz
echo-2_desc-PCAS0ModelPredictions_components.nii.gz
echo-2_desc-PCA_components.nii.gz
echo-2_desc-Rejected_bold.nii.gz
echo-2_desc-TedanaInput.nii.gz
echo-3_desc-Accepted_bold.nii.gz
echo-3_desc-Denoised_bold.nii.gz
echo-3_desc-ICAT2ModelPredictions_components.nii.gz
Expand All @@ -68,6 +70,7 @@ echo-3_desc-PCAT2ModelPredictions_components.nii.gz
echo-3_desc-PCAS0ModelPredictions_components.nii.gz
echo-3_desc-PCA_components.nii.gz
echo-3_desc-Rejected_bold.nii.gz
echo-3_desc-TedanaInput.nii.gz
echo-4_desc-Accepted_bold.nii.gz
echo-4_desc-Denoised_bold.nii.gz
echo-4_desc-ICAT2ModelPredictions_components.nii.gz
Expand All @@ -77,6 +80,7 @@ echo-4_desc-PCAT2ModelPredictions_components.nii.gz
echo-4_desc-PCAS0ModelPredictions_components.nii.gz
echo-4_desc-PCA_components.nii.gz
echo-4_desc-Rejected_bold.nii.gz
echo-4_desc-TedanaInput.nii.gz
references.bib
report.txt
tedana_report.html
Expand Down
5 changes: 5 additions & 0 deletions tedana/tests/data/nih_five_echo_outputs_verbose.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ echo-1_desc-PCAT2ModelPredictions_components.nii.gz
echo-1_desc-PCAS0ModelPredictions_components.nii.gz
echo-1_desc-PCA_components.nii.gz
echo-1_desc-Rejected_bold.nii.gz
echo-1_desc-TedanaInput.nii.gz
echo-2_desc-Accepted_bold.nii.gz
echo-2_desc-Denoised_bold.nii.gz
echo-2_desc-ICAT2ModelPredictions_components.nii.gz
Expand All @@ -51,6 +52,7 @@ echo-2_desc-PCAT2ModelPredictions_components.nii.gz
echo-2_desc-PCAS0ModelPredictions_components.nii.gz
echo-2_desc-PCA_components.nii.gz
echo-2_desc-Rejected_bold.nii.gz
echo-2_desc-TedanaInput.nii.gz
echo-3_desc-Accepted_bold.nii.gz
echo-3_desc-Denoised_bold.nii.gz
echo-3_desc-ICAT2ModelPredictions_components.nii.gz
Expand All @@ -60,6 +62,7 @@ echo-3_desc-PCAT2ModelPredictions_components.nii.gz
echo-3_desc-PCAS0ModelPredictions_components.nii.gz
echo-3_desc-PCA_components.nii.gz
echo-3_desc-Rejected_bold.nii.gz
echo-3_desc-TedanaInput.nii.gz
echo-4_desc-Accepted_bold.nii.gz
echo-4_desc-Denoised_bold.nii.gz
echo-4_desc-ICAT2ModelPredictions_components.nii.gz
Expand All @@ -69,6 +72,7 @@ echo-4_desc-PCAT2ModelPredictions_components.nii.gz
echo-4_desc-PCAS0ModelPredictions_components.nii.gz
echo-4_desc-PCA_components.nii.gz
echo-4_desc-Rejected_bold.nii.gz
echo-4_desc-TedanaInput.nii.gz
echo-5_desc-Accepted_bold.nii.gz
echo-5_desc-Denoised_bold.nii.gz
echo-5_desc-ICAT2ModelPredictions_components.nii.gz
Expand All @@ -78,6 +82,7 @@ echo-5_desc-PCAT2ModelPredictions_components.nii.gz
echo-5_desc-PCAS0ModelPredictions_components.nii.gz
echo-5_desc-PCA_components.nii.gz
echo-5_desc-Rejected_bold.nii.gz
echo-5_desc-TedanaInput.nii.gz
references.bib
report.txt
tedana_report.html
Expand Down
8 changes: 8 additions & 0 deletions tedana/workflows/tedana.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,14 @@ def tedana_workflow(
"to correct your TR to the value it should be."
)

# Save input data
for i in range(n_echos):
io_generator.save_file(
io.new_nii_like(ref_img, np.squeeze(catd[:, i, :])),
"input img",
echo=i + 1,
)

if mixm is not None and op.isfile(mixm):
mixm = op.abspath(mixm)
# Allow users to re-run on same folder
Expand Down

0 comments on commit c7349bd

Please sign in to comment.