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

Additional tutorial entries for code snippets #1556

Closed
3 tasks
veggiesaurus opened this issue Jul 9, 2021 · 7 comments · Fixed by #2210
Closed
3 tasks

Additional tutorial entries for code snippets #1556

veggiesaurus opened this issue Jul 9, 2021 · 7 comments · Fixed by #2210
Assignees
Labels
enhancement New feature or request

Comments

@veggiesaurus
Copy link
Collaborator

Additional tutorial entries are needed for the following:

  • Changing FoV, channels and Stokes of images
  • Adjusting render config
  • Creating regions

@kswang1029 may have more suggestions on what to add after testing out the code snippets feature in more detail

@veggiesaurus veggiesaurus added the enhancement New feature or request label Jul 9, 2021
@veggiesaurus veggiesaurus self-assigned this Jul 9, 2021
@veggiesaurus veggiesaurus added this to the v3.0b-1 milestone Jul 9, 2021
@veggiesaurus veggiesaurus modified the milestones: v3.0b-1, v3.0b-2 Aug 5, 2021
@veggiesaurus veggiesaurus removed this from the v3.0b-2 milestone Nov 15, 2021
@veggiesaurus
Copy link
Collaborator Author

moving this and #1482 to the final 3.0 beta milestone, as it is low-risk

@keflavich
Copy link

Bump - are there any existing tools for loading regions?

@veggiesaurus
Copy link
Collaborator Author

Bump - are there any existing tools for loading regions?

@keflavich you can load regions into the current active image using

await app.importRegion(directory, filename, regionType);

where regionType is the region type enum value. CRTF = 1 and DS9 = 2.

@keflavich
Copy link

perfect, thank you!

Related: is there a delete for regions? If I open a region file that has 100x, say, is there a scripty way to delete them?

@veggiesaurus
Copy link
Collaborator Author

veggiesaurus commented Jan 13, 2022

perfect, thank you!

Related: is there a delete for regions? If I open a region file that has 100x, say, is there a scripty way to delete them?

This might be a bit slow for 100 regions (it will do a filter for each deletion, so it probably O(N²). I'd like to add a .clearRegions function too, because this is probably quite a common use case):

for (const region of app.activeFrame.regionSet.regions) {
    app.activeFrame.regionSet.deleteRegion(region);
}

@keflavich
Copy link

yes, I think there are a lot of different region-related functions that could use additional support, and I'd be happy to expand on them somewhere if you'd like - but I suspect you guys have a checklist somewhere?

Anyway, thanks, this will work at least to clear out regions without clicking a ton.

@veggiesaurus
Copy link
Collaborator Author

yes, I think there are a lot of different region-related functions that could use additional support, and I'd be happy to expand on them somewhere if you'd like - but I suspect you guys have a checklist somewhere?

Anyway, thanks, this will work at least to clear out regions without clicking a ton.

Feel free to send me a list of requested functions/tutorials/etc. Quite a few might already be easily done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants