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

[FIX] Clarify data types and requirement levels for all JSON files #605

Merged
merged 33 commits into from
Sep 19, 2020

Conversation

sappelhoff
Copy link
Member

@sappelhoff sappelhoff commented Sep 14, 2020

closes #350
closes #221
closes #533
fixes part of bids-standard/bids-validator#1065

this is a draft to get comments on whether this would be something we want for the entire spec.

Also some specific questions:

  • Does somebody have a better link to describe JSON strings than https://www.w3schools.com/js/js_json_syntax.asp ?
  • What do you think of the "data type" column entry for Levels --> [object][object] with string: string key-value pairs is that clear enough? --> in JSON all keys MUST be strings ... but I wanted to make the point that the values in the Levels object MUST be strings as well.

TO DO

  • render pdf in landscape so that tables are easier to read
  • decrease the extremely large margins in the PDF build (currently 1.5 inch), so that tables are displayed more easily --> perhaps go to 0.75 inch
    • center align the "fancyheader" and "fancyfooter" (see header.tex) to make the PDF look nice with smaller marging
  • make sure that no tables break in the pdf build (see e.g., https://github.com/bids-standard/bids-specification/pull/605/files#r488467181) --> NOTE: Some single rows do break, e.g., AnatomicalLandmarkCoordinateSystemDescription ... simply because the "key" is too long and will overlap with the req. level column. that happens only a few times and is unavoidable at this point.
  • double check that all tables render in the html build

PDF status

I don't know what's happening ... in a8cb249 everything is nice ... one commit later the tables are broken again: 357bfd3 (--> checkout the circle ci build artifact in each commit)

--> fixed. This was a funny mix of python's os.walk not being deterministic, a broken MD table, and a python-table-rendering script that did not warn upon error :)

@sappelhoff sappelhoff added the opinions wanted Please read and offer your opinion on this matter label Sep 14, 2020
Copy link
Member

@tsalo tsalo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the level of detail is quite reasonable.

@tsalo
Copy link
Member

tsalo commented Sep 14, 2020

@sappelhoff do you want to convert the PR to a draft to make sure no one accidentally merges it once reviews are in?

@effigies
Copy link
Collaborator

This looks reasonable.

  1. I don't know of a better reference for strings.
  2. We could say [object][] of [strings][string], as examples should make clear what that means, but being explicit about key/value pairs is also fine.

@sappelhoff sappelhoff marked this pull request as draft September 14, 2020 16:03
@sappelhoff sappelhoff added this to the 1.4.1 milestone Sep 14, 2020
@effigies
Copy link
Collaborator

Reviewing, but as an initial comment, the Requirement Level column takes up a ton of space for 2 bits of information. What if we added abbreviations to use? Some options and evaluations:

REQUIRED RECOMMENDED OPTIONAL Thoughts
REQ REC OPT Straightforward, REQ and REC look and are pronounced similar
RQRD RCMD OPTL Less confusable. Ugly.
Req Rec Opt No longer CAPS, but they are used in isolation, q looks unlike c
MUST SHLD MAY Shorter, look like official alternatives, semantically weird
MUST SHOULD MAY Same as above, SHOULD looks less weird though

If we do go with an abbreviation, I would specify it in the common principles, and I would change the header from Requirement Level to simply Level (also to be described in common principles).

src/05-derivatives/02-common-data-types.md Outdated Show resolved Hide resolved
src/05-derivatives/03-imaging.md Show resolved Hide resolved
src/05-derivatives/03-imaging.md Outdated Show resolved Hide resolved
| ---------------------- | ---------------------------------------------------------------------------------------------------------------- | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| EchoTime | RECOMMENDED, but REQUIRED if corresponding fieldmap data is present or the data comes from a multi echo sequence | [number][] | The echo time (TE) for the acquisition, specified in seconds. Corresponds to DICOM Tag 0018, 0081 `Echo Time` (please note that the DICOM term is in milliseconds not seconds). |
| InversionTime | RECOMMENDED | [number][] | The inversion time (TI) for the acquisition, specified in seconds. Inversion time is the time after the middle of inverting RF pulse to middle of excitation pulse to detect the amount of longitudinal magnetization. Corresponds to DICOM Tag 0018, 0082 `Inversion Time` (please note that the DICOM term is in milliseconds not seconds). |
| SliceTiming | RECOMMENDED, but REQUIRED for sparse sequences that do not have the `DelayTime` field set | [array][] of [numbers][] | The time at which each slice was acquired within each volume (frame) of the acquisition. Slice timing is not slice order -- rather, it is a list of times containing the time (in seconds) of each slice acquisition in relation to the beginning of volume acquisition. The list goes through the slices along the slice axis in the slice encoding dimension (see below). Note that to ensure the proper interpretation of the `SliceTiming` field, it is important to check if the OPTIONAL `SliceEncodingDirection` exists. In particular, if `SliceEncodingDirection` is negative, the entries in `SliceTiming` are defined in reverse order with respect to the slice axis (i.e., the final entry in the `SliceTiming` list is the time of acquisition of slice 0). Without this parameter slice time correction will not be possible. |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it might make the most sense to keep the requirement level brief, e.g. RECOMMENDED/REQUIRED, and add the REQUIRED for sparse sequences that do not have the DelayTime field set to the end of the description.

@sappelhoff
Copy link
Member Author

Thanks @effigies, I addressed all your comments except the following:

shortening the "Requirement Level" column

Reviewing, but as an initial comment, the Requirement Level column takes up a ton of space for 2 bits of information. What if we added abbreviations to use?

link to review comment

I see your point, but I find the new layout aesthetically pleasing, and have not too big of a motivation to decrease the width of the Requirement column manually.

image

Perhaps this could be something to return to once we start generating these tables automatically?

Need some more opinions @tsalo @yarikoptic

Keeping the "Requirement level" column brief

i think it might make the most sense to keep the requirement level brief, e.g. RECOMMENDED/REQUIRED, and add the REQUIRED for sparse sequences that do not have the DelayTime field set to the end of the description.

link to review comment

Personally, I find it nicer to read everything about requirements in the requirement level column. It makes more sense to me logically, but you do have a point that a very wide "requirement level" column looks ugly ... especially when there are few rows that need the width, and most rows could actually get along with having a very short width.

Yet in rendered form, this looks quite okay and nice IMHO:

image

So I'd be in favor of keeping it as it is

Copy link
Collaborator

@effigies effigies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. One small suggestion.

@effigies
Copy link
Collaborator

Oh, and FWIW I agree that the tables look fine in HTML. In the PDF, the description is pushed quite far to the right.

@sappelhoff
Copy link
Member Author

@tsalo could you please have a final look again? I'd like to get this merged as soon as possible to avoid merge conflicts ... this PR is touching almost every table in the spec after all :-)

Copy link
Member

@tsalo tsalo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed one minor issue but other than that everything looks great to me.

@sappelhoff
Copy link
Member Author

Thanks for the reviews, this is going in now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
opinions wanted Please read and offer your opinion on this matter
Projects
None yet
4 participants