Print

Print


Paul Emsley wrote:
> How about a "Read USF Map" function/button?  

Dodgy maps can come from elsewhere too. I expect you can generate them 
in most suites - I think the old CCP4 'extend' program can do it.

"Open and convert map..." would be a reasonable description, with
"Open a map and convert to crystallographic space" as the tooltip.

> Is there a clipper way to do what mapmask is doing for us? (I'd rather
> not run a separate program with that creating a new map if we can munge
> the USF map on the fly.)  If not, we should fall back to running
> mapmask, of course.

Yes. Open the map, fetch the spacegroup, cell and sampling from the file 
object, and then create an Xmap from that information. Fill the Xmap 
with a large negative flag value.

Create an NXmap and import the file contents into it.

Then loop over the contents of the NXmap, replacing the value at the 
corresponding position in the Xmap with the maximum of the NXmap and 
Xmap values.

Finally, zero any remaining flags in the xmap.

It can (and should) be done for both MTZ and CNS import objects. I'll 
have a look at the code again and see if it can be done tidily.