ranieremenezes/easyfermi

[Bug]: Cannot save GUI state

Closed this issue · 7 comments

What happened?

While trying to reproduce #49 for fermipy people I got this other issue after downloading the data and immediately after clicking the "Go" button.

Environment

- OS: macos 11.7.10 
- fermipy: v1.2
- fermitools: 2.2.0
- pyqt: 5.15.9
- easyfermi: 2.0.9.dev25+g5defaaa

Relevant log output

Traceback (most recent call last):
  File "/Users/michele/Applications/easyFermi/src/easyfermi/easyfermi.py", line 1339, in runLongTask
    self.save_GUIstate()
  File "/Users/michele/Applications/easyFermi/src/easyfermi/easyfermi.py", line 1463, in save_GUIstate
    with open(self.OutputDir+"./GUI_status.yaml", 'w') as yaml_file:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/michele/Applications/easyFermi/Output/./GUI_status.yaml'

I'm also currently dealing with this issue. Is there any workaround/solution to the GUI_status file not being created?

Hi @vyaas3305 ,

Can you give me the information about your environment and log output, as done before by @HealthyPear ?

Environment Details

- OS: Ubuntu 22.04.4 LTS 
- python: 3.9.19
- fermipy: v1.2
- fermitools: 2.2.0
- healpy: 1.16.1
- gammapy: 1.1
- scipy: 1.10.1
- astropy: 5.3.3
- astroquery: 0.4.6
- psutil: 5.9.8
- emcee: 3.1.4
- corner: 2.2.2
- pyqt: 5.15.9
- easyfermi: 2.0.12

Relevant Logs

Traceback (most recent call last):
  File "/home/vyaas/miniconda3/envs/easyfermi/lib/python3.9/site-packages/easyfermi/easyfermi.py", line 1339, in runLongTask
    self.save_GUIstate()
  File "/home/vyaas/miniconda3/envs/easyfermi/lib/python3.9/site-packages/easyfermi/easyfermi.py", line 1463, in save_GUIstate
    with open(self.OutputDir+"./GUI_status.yaml", 'w') as yaml_file:
FileNotFoundError: [Errno 2] No such file or directory: '/home/vyaas/Documents/Easyfermi_Analysis/Mrk_421/Output/./GUI_status.yaml'

I don't know how the code works, but I think it might have to do something with not being able to open a file in write mode? (maybe because the code dosen't have the appropriate permissions?)

Update: I was able to run the code, after generating the .config file from the GUI. I guess the problem has to do something with the ./Output folder not being present in the working directory before running the analysis? Also, where do I get VHE data for the objects of my interest and is the VHE data really necessary for the analysis?

Hi @HealthyPear and @vyaas3305 ,

Could you please update easyfermi to version 2.0.13 and try again?

You can update it by activating the easyfermi environment and typing:
pip install easyfermi --upgrade --no-deps

Let me know if everything works now so I can close this issue.

Also, where do I get VHE data for the objects of my interest and is the VHE data really necessary for the analysis?

  • The VHE is not necessary. You will have access to VHE data only if you are a member of e.g. a IACT collaboration (i.e. private data) or if you take data already published on a paper.

@HealthyPear , with this new version, I am having issues with the continuous integration on macOS. Do you know what could possibly cause this problem? The modifications in easyfermi were minimum, so I would not expect any problem with the installation. It looks like an incompatibility with PyQt5. You can find the problem here: https://github.com/ranieremenezes/easyfermi/actions/runs/8970306440

Update: This issue seems to be fixed now.

Just another question, is there a way to generate TS maps without the annotations or TS maps of only a part of the RoI, just from the GUI or by using the config file? (since the image becomes very hard to read when there are a lot of sources).

Hi @vyaas3305 , there is no direct option for removing the annotations from the png images, however you can open the ".fits" files "Target_TS_map_[...].fits" and "Residuals_TS_map[...].fits" with DS9 or astropy (eg here) and play with the TS image without the annotations.