AstarVienna / METIS_Simulations

Scripts for simulating METIS with ScopeSim
1 stars 0 forks source link

Cy/issue 41 #42

Closed chyan26 closed 5 months ago

chyan26 commented 5 months ago

Fixing for Issue 41

chyan26 commented 5 months ago

I changed the block to a better manner. If there is no TECH keyword, exit the code.

hugobuddel commented 5 months ago

This is a PR to change the MJD-OBS, so it shouldn't be necessary to add changes to other parts of the code. In git, you can easily make different branches for different things. So it would have been better to make a new branch for just this particular fix. In fact, you could still do so.

As for the try block, if there is data generated without a DPR.TECH keyword, then we should fix that particular simulation definition in https://github.com/AstarVienna/METIS_Simulations/blob/main/ESO/recipes.yaml updateHeaders.py is only for problems that cannot currently (easily) be fixed in another way.

And if we would want to add such an exception here, then the except block should be more specific, like except KeyError:. And the code should still continue to process the rest of the files, not exit. But I strongly think the try-except block should not be there in the first place.

chyan26 commented 5 months ago

OK, I have removed the block. Please merge the PR

hugobuddel commented 5 months ago

Oh, if you refer to issues like this:

Closes #41

Then the issue would automatically be closed if the PR is merged