Skip to content

Check for valid atlas before running #255

@mckenziephagen

Description

@mckenziephagen

Summary

I've been running into an (admittedly, entirely user-fault) error because I haven't been setting the --atlas flag for the 4S Schaefer 100 atlas properly. But it's been difficult to debug because QSIrecon does run for quite awhile before hitting this error. It would be great if the CLI parser would check to see if the atlas string is valid.

Others have also encountered similar difficulties using custom atlases (see: this post on neurostars), so there could also be a check that the expected atlas path exists.

Next steps

Potentially could be solved with an additional if statement in parse_args i.e. along the lines of:

if atlas not in [list_of_builtin_atlases]:
     if os.path.exists(atlas_path) == False:    
         parser.error("Invalid atlas path") 
     else: 
          parser.error("Invalid atlas string for built in atlas") 

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions