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 path handling in SANS isis_reductions_steps #10715

Closed
martyngigg opened this issue Jul 11, 2014 · 1 comment
Closed

Fix path handling in SANS isis_reductions_steps #10715

martyngigg opened this issue Jul 11, 2014 · 1 comment
Assignees
Labels
High Priority An issue or pull request that if not addressed is severe enough to postponse a release. SANS Issues and pull requests related to SANS
Milestone

Comments

@martyngigg
Copy link
Member

The path handling in scripts/SANS/isis_reduction_steps.py is inconsistent. Some places use os.path.join and others simply add / separators. These all should harmonize on using os.path.join.

Another related problem is path handling when loading the pixel correction file on line 1581 of scripts/SANS/isis_reduction_steps.py. The load is done via an ```eval}} call where all of the code is in a string. If the self._pixel_file is a windows path that happens to contain a directory name that starts with a character that can be interpreted as an escape character, e.g.

C:\release\Data\LOQ/FLAT_CELL.061

where the \r would be interpreted as a carriage return then the path is invalid and the command fails. In this particular case I think line 1581 just needs to be changed to

load_com = self._load+'(Filename=r"'+self._pixel_file+'",OutputWorkspace="'+pixel_adj+'"'

to make the Filename string a raw string so that escape characters are ignored.

@martyngigg
Copy link
Member Author

This issue was originally trac ticket 9873

@martyngigg martyngigg added High Priority An issue or pull request that if not addressed is severe enough to postponse a release. SANS Issues and pull requests related to SANS labels Jun 3, 2015
@martyngigg martyngigg added this to the Release 3.3 milestone Jun 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
High Priority An issue or pull request that if not addressed is severe enough to postponse a release. SANS Issues and pull requests related to SANS
Projects
None yet
Development

No branches or pull requests

2 participants