Attribute error thrown for real external param?

Asked by Radha Mastandrea on 2020-11-19

I am currently trying to work with a user-defined model. I have defined an external parameter (set to zero for testing purposes) in the following way

cSymm = Parameter(name = 'cSymm',
                     nature = 'external',
                    type = 'real',
                    value = '0.0',
                    texname = '\\text{cSymm}',
                    lhablock = 'TEST',
                    lhacode = [ 1 ])

I am able to import my model and it passes all checks. However, the output of my generate process command gives the following error
"AttributeError : 'str' object has no attribute 'imag'"
which is stemming from the following line in write_param_card
"if param.value != 'auto' and param.value.imag != 0:" (line 249)

But all of the user-defined parameters I've added have been explicitly declared to be real, so I'm not sure why this error is being thrown?

Question information

English Edit question
MadGraph5_aMC@NLO Edit question
No assignee Edit question
Solved by:
Manfred Hampl
Last query:
Last reply:

This question was reopened

Best Manfred Hampl (m-hampl) said : #1

value = '0.0',

is wrong, it has to be

value = 0.0,

Radha Mastandrea (rrm50) said : #2

Thank you -- I had been working with an older version of the FeynRules package that specified values should be placed in string quotes.

I do have another question (let me know if this should be opened in another thread) -- I have changed the value to be a float, and I am getting an error related to my definition of the new lhablock:

str : Invalid restriction card (not same block)
     {'yukawa', 'mass', 'sminputs', 'wolfenstein', 'decay'} != {'yukawa', 'mass', 'sminputs', 'test', 'wolfenstein', 'decay'}.
     Missing block: liv
     Unknown block :

How might I be able to define this new LHA block for my own beyond-standard model theory? I can't find any explicit mention to any of the previously defined LHA blocks anywhere in the UFO parameter files so I am not sure where this would be done.

Thank you!

Radha Mastandrea (rrm50) said : #3

I've got it -- I had to edit restrict_default to add in the lhablock