CARTAvis / carta-python

CARTA scripting wrapper written in Python
GNU General Public License v3.0
0 stars 0 forks source link

support a resolution scaling factor for export-as-png #81

Open kswang1029 opened 1 year ago

kswang1029 commented 1 year ago

The frontend supports three resolution scaling options as 100% (as is on screen), 200%, and 400%, if users need a higher resolution PNG image for presentation purposes. Session.save_rendered_view() function could be enhanced to support this.

Currently we can use Session.set_view_area() to a desired PNG size. Having the scaling factor would be a handy if users are in the interactive mode. For headless mode, Session.set_view_area() alone should be sufficient.

Jordatious commented 1 year ago

This isn't quite intuitive to me. What's an example call Session.set_view_area() for something like 200% scaling?

kswang1029 commented 1 year ago

This isn't quite intuitive to me. What's an example call Session.set_view_area() for something like 200% scaling?

Need to consider both headless and interactive modes. So we need this (mainly for interactive mode)

Jordatious commented 1 year ago

Certainly I agree we need to support the 200% and 400% quality. It's just not clear how easy that is currently. In interactive mode, the user could use the GUI.

Jordatious commented 1 year ago

Another option that I don't see listed is to save in a format supportive of vectors (PDF, PS, EPS). This would be helpful for regions, contours, vector overlays or other annotations. Furthermore, despite giving no advantage to raster images, journals often request or require EPS images.

kswang1029 commented 1 year ago

Another option that I don't see listed is to save in a format supportive of vectors (PDF, PS, EPS). This would be helpful for regions, contours, vector overlays or other annotations. Furthermore, despite giving no advantage to raster images, journals often request or require EPS images.

We will wait until the frontend can support those. The scripting interface basically supports what can be done with the frontend only.

Jordatious commented 1 year ago

Makes sense. I guess I'm punting for its addition on the frontend, and relating it to the goal of having publication-quality images.