Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#520 closed enhancement (fixed)

Add setzoom command

Reported by: Tom Goddard Owned by: Tom Goddard
Priority: major Milestone:
Component: Core Version:
Keywords: Cc: meng@…
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

Useful to have a command setzoom that zooms to a specified Angstroms per pixel at center of bounding box (for perspective view). This allows making images with matching scales.

Change History (5)

comment:1 by Elaine Meng, 9 years ago

Maybe could be an option of the zoom command, which currently only takes a factor relative to the current zoom.

comment:2 by Tom Goddard, 9 years ago

Cc: meng@… added
Resolution: fixed
Status: assignedclosed

Fixed.

Added zoom command pixelSize option that sets the size of one pixel in Angstroms at the center of rotation. If the zoom factor option is also given then it divides the specified pixel size (factor bigger than one make pixel size smaller, so magnification is higher).

Also the zoom command with no arguments reports the current pixel size at the center of rotation.

in reply to:  3 ; comment:3 by Elaine Meng, 9 years ago

Wouldn’t it make more sense to multiply the relative factor by the pixelSize value instead of dividing?  As described, the relative factor will have opposite effects depending on whether pixelSize is also given.  E.g. >1 expands if no pixelSize given, shrinks if pixelSize given.

in reply to:  4 ; comment:4 by Elaine Meng, 9 years ago

Oops I misunderstood your initial explanation.  Now I see it does work as I thought it would, where factor >1 always makes the objects bigger than if factor were not specified.  Sounds good!

comment:5 by Tom Goddard, 9 years ago

I've changed the behavior of zoom command frames option so the total zoom factor over N frames is the specified factor.
Formerly it applied the specified zoom factor every frame. In frames is used with pixelSize then in zooms to the desired pixel size over the specified number of frames.

If the specified zoom factor is F then the zoom for each of N frames is F(1/N). In other words, at each frame the scale factor applied is the same.

Note: See TracTickets for help on using tickets.