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

-continue keyword in wsclean does not work in stimela? #23

Open
Victoria-Samboco opened this issue Feb 23, 2023 · 4 comments
Open

-continue keyword in wsclean does not work in stimela? #23

Victoria-Samboco opened this issue Feb 23, 2023 · 4 comments

Comments

@Victoria-Samboco
Copy link
Contributor

Hi @o-smirnov . There's a wsclean parameter called -continue that we can use to continue a previous deconvolution run, and -reuse-psf and -reuse-dirty to skip imaging of those two and directly clean existing images, but it does not work in stimela, I've added it to a cab as you recommended before for the -wgridder-accuracy parameter but still returning an error:

2023-02-23 12:06:27 STIMELA ERROR: pre-validation of recipe 'boom' failed
─────────────────────────────────── detailed error report follows ───────────────────────────────────
        ⚠ pre-validation of recipe 'boom' failed
        └── step 'clean_image_sun' failed prevalidation
            └── step 'image' failed prevalidation
                ├── TypeError: Field names must not be keywords: 'continue'
                └── Traceback:
                    ├──   File 
                    │   "/home/samboco/Virtual_enviroments/stimela_env/lib/python3.8/site-packages/st
                    │   imela/kitchen/recipe.py", line 669, in prevalidate_steps
                    │       step_params = step.prevalidate(subst)
                    ├──   File 
                    │   "/home/samboco/Virtual_enviroments/stimela_env/lib/python3.8/site-packages/st
                    │   imela/kitchen/step.py", line 269, in prevalidate
                    │       params = self.validated_params = self.cargo.prevalidate(self.params, 
                    │   subst, root=root)
                    ├──   File 
                    │   "/home/samboco/Virtual_enviroments/stimela_env/lib/python3.8/site-packages/sc
                    │   abha/cargo.py", line 345, in prevalidate
                    │       params = validate_parameters(params, self.inputs_outputs, 
                    │   defaults=self.defaults, subst=subst, fqname=self.fqname,
                    ├──   File 
                    │   "/home/samboco/Virtual_enviroments/stimela_env/lib/python3.8/site-packages/sc
                    │   abha/validate.py", line 178, in validate_parameters
                    │       dcls = dataclasses.make_dataclass("Parameters", fields)
                    └──   File "/usr/lib/python3.8/dataclasses.py", line 1219, in make_dataclass
                            raise TypeError(f'Field names must not be keywords: {name!r}')

How I can deal with it?

@o-smirnov
Copy link
Collaborator

Same as last time, if some keyword is missing, you can temporarily add it like so:

cabs:
  wsclean:
    inputs:
      continue:
        dtype: bool

@Victoria-Samboco
Copy link
Contributor Author

Same as last time, if some keyword is missing, you can temporarily add it like so:

cabs:
  wsclean:
    inputs:
      continue:
        dtype: bool

yes, thats what I did here, like this, but it continues with the same error

cabs:
  wsclean:
    inputs:
      wgridder-accuracy:
        dtype: float
      continue:
        dtype: bool

@o-smirnov
Copy link
Collaborator

Ah wait Field names must not be keywords: 'continue', that's a Python limitation we're hitting. I'll have to add a workaround to Stimela. In the meantime, try renaming it like so:

cabs:
  wsclean:
    inputs:
      do_continue:
        dtype: bool
        nom_de_guerre: continue

...and use do_continue in your params.

@Victoria-Samboco
Copy link
Contributor Author

Ah wait Field names must not be keywords: 'continue', that's a Python limitation we're hitting. I'll have to add a workaround to Stimela. In the meantime, try renaming it like so:

cabs:
  wsclean:
    inputs:
      do_continue:
        dtype: bool
        nom_de_guerre: continue

...and use do_continue in your params.

Okay, its working now, thanks.

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