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

sofia2 in the line worker #1624

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

sofia2 in the line worker #1624

wants to merge 2 commits into from

Conversation

dane-kleiner
Copy link
Collaborator

@dane-kleiner dane-kleiner commented Feb 11, 2025

Sofia-2 with many more options to replace sofia. It requires the latest Stimela to test -- An update was needed to fix the handling of one of the sofia settings.

The current set up is that any sofia-2 input file (e.g. own mask, flagging catalogue) needs to be in the same directory as the input cube. This can be changed, I'm not sure it makes it better -- happy to discuss. If using Sofia-2 for making a clean mask with wscl + sofia, the output of the source finding is put in the output directory of the cube it was run on. If do_sourcefinding is true, then the outputs are put into its own sofia directory where the input cube is.

@ratt-priv-ci
Copy link
Collaborator

Can one of the admins verify this patch?

@dane-kleiner
Copy link
Collaborator Author

Should take care of #1320.

@@ -208,11 +208,14 @@ def calc_rms(filename, linemaskname):
return np.sqrt(np.sum(y * y, dtype=np.float64) / y.size)
else:
with fits.open(filename) as cube:
datacube = cube[0].data
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part has been modified because I believe that sofia2 saves cubes without (whereas sofia kept) the stokes axis , so this makes sure the cube and clean_mask have the same dimensions to do this calculation. @paoloserra

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

Successfully merging this pull request may close these issues.

2 participants