[cctbxbb] Phil (dumb) question

Nicholas Sauter nksauter at lbl.gov
Mon Jan 14 08:39:34 PST 2013


Graeme,

The problem in your example is that the fetch() function call returns
a new phil object; it does not modify its own class instance.
Therefore you can get what you want by calling
working_phil.fetch(parse(more)).show().

Nick

On Mon, Jan 14, 2013 at 8:15 AM,  <Graeme.Winter at diamond.ac.uk> wrote:
> Hi Folks,
>
> I have a toy example where I should be overriding Phil defaults:
>
> phil_defaults = '''
> resolutionizer {
>   rmerge = 0.0
>     .type = float
>   completeness = 0.0
>     .type = float
>   isigma = 1.0
>     .type = float
>   misigma = 2.0
>     .type = float
>   bins = 100
>     .type = int
> }
> '''
>
> more = '''
> resolutionizer {
>   isigma = 2.0
>   misigma = 4.0
> }
> '''
>
> from libtbx.phil import parse
>
> working_phil = parse(phil_defaults)
> working_phil.fetch(parse(more))
> working_phil.show()
>
>
>
> but it seems I am not:
>
>
> Graemes-MacBook-Pro:scale graeme$ cctbx.python toy.py
> resolutionizer {
>   rmerge = 0.0
>   completeness = 0.0
>   isigma = 1.0
>   misigma = 2.0
>   bins = 100
> }
>
>
> Am I doing something dumb? I hope so as I really cannot find my error.
>
> Thanks,
>
> Graeme
>
> --
> This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
> Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
> Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
> Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
>
>
>
>
> _______________________________________________
> cctbxbb mailing list
> cctbxbb at phenix-online.org
> http://phenix-online.org/mailman/listinfo/cctbxbb



-- 
Nicholas K. Sauter, Ph. D.
Computer Staff Scientist, Physical Biosciences Division
Lawrence Berkeley National Laboratory
1 Cyclotron Rd., Bldg. 64R0121
Berkeley, CA 94720-8118
(510) 486-5713


More information about the cctbxbb mailing list