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

Unable to get files from soxs cache directory #38

Closed
xshaokun opened this issue May 15, 2024 · 3 comments
Closed

Unable to get files from soxs cache directory #38

xshaokun opened this issue May 15, 2024 · 3 comments

Comments

@xshaokun
Copy link

Since version 4.7.1, the files located in the soxs cache directory cannot be retrieved during instrument simulation and are instead downloaded directly from the database, unless the response files are located in the current directory. This seems different from the previous behavior. I dove into the code and found that the method get_data_file(fn) only checks the current directory.

https://github.com/lynx-x-ray-observatory/soxs/blob/57c3a23c932296cdfadf06a571dd06fde4cfc030/soxs/utils.py#L308C1-L317C1

@xshaokun
Copy link
Author

xshaokun commented May 24, 2024

More Details

I create a new instrument specification as follows

chandra_circinus = soxs.get_instrument_from_registry("chandra_aciss_cy0")
chandra_circinus["name"] = "chandra_aciss_circinus"
chandra_circinus["arf"] = "Circinus_W_lobe_comb_src.arf"
chandra_circinus["rmf"] = "Circinus_W_lobe_comb_src.rmf"
name = soxs.add_instrument_to_registry(chandra_circinus)

If the file Circinus_W_lobe_comb_src.arf is located in the soxs cache directory instead of the current directory, the instrument simulation raises a ValueError

ValueError: File 'Circinus_W_lobe_comb_src.arf' is not in the registry.

@jzuhone
Copy link
Contributor

jzuhone commented Jun 3, 2024

This should be fixed in 4696f9b, please let me know if it's not.

@xshaokun
Copy link
Author

xshaokun commented Jun 5, 2024

It works. Thanks! @jzuhone

@xshaokun xshaokun closed this as completed Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants