-
Notifications
You must be signed in to change notification settings - Fork 0
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
Expand access to TILES data #325
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth a test to check that the stokes parameter is being understood and used correctly when it gets the files?
I'm not sure what you mean by that |
Sorry, I was meaning the test that has changed in this PR, the get_files one, it isn't testing that the different stokes files are obtained correctly. I wondered if it was worth adding a parametrize on that test to also add the stokes argument (if it works like that I can't remember - or if there isn't already a stokes test that I have forgotten about). |
image_file_fmt = ( | ||
"image.i.{}.SB{}.cont" | ||
"image.{}.{}.SB{}.cont" | ||
".taylor.0.restored.fits".format( | ||
row.field, row.sbid | ||
self.settings['stokes'].lower(), row.field, row.sbid | ||
) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might be getting confused here, is there now access to stokes V tiles? And not just stokes I?
As my last comment came from this bit where the stokes has been added.
As there is also this test which may need to be sorted out:
vast-tools/tests/test_query.py
Lines 566 to 594 in e6d17b7
def test_init_failure_stokes_v_tiles(self, mocker) -> None: | |
""" | |
Tests the initialisation failure of a Query object. | |
Specifically when Stokes V is requested on tile images. | |
Args: | |
mocker: The pytest-mock mocker object. | |
Returns: | |
None | |
""" | |
with pytest.raises(vtq.QueryInitError) as excinfo: | |
isdir_mocker = mocker.patch( | |
'vasttools.query.os.path.isdir', | |
return_value=True | |
) | |
test_dir = '/testing/folder' | |
query = vtq.Query( | |
epochs='all-vast', | |
planets=['Mars'], | |
base_folder=test_dir, | |
stokes='v', | |
use_tiles=True | |
) | |
assert str(excinfo.value).startswith( | |
"Problems found in query settings!" | |
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also a tad confused, but I think/hope my latest commit has addressed what you're talking about.
You're right, there's no access to stokes V tiles yet, but I figured I might as well remove the hardcoded stokes I while I'm working on that part of the code so it's there and ready if we do decide to add it in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok so the coded blocks for Stokes V tiles, like what that test I linked to above is checking, should remain for now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good if the Stokes V tiles block does need to remain.
Fix #320.
Fix #217.