I need to do some numerical computation on special values of a Hecke L-function $L(s,\chi)$. To do this, I want to construct a Hecke character in MAGMA, given that I know its infinity type.

In other words, suppose we are working on a totally real field $K$. My Hecke character $\chi$ is first defined over the principal ideals by

$$\chi((\alpha))=\prod sgn(\sigma_i(\alpha))^{m_i}|\sigma_i(\alpha)|^{n_i}$$

where $\sigma_i$'s are the real embeddings, $m_i=0$ or $1$, and $n_i\in \mathbb{C}$. For some good values of $m,n$ this can be extended to all ideals, thus becomes a Hecke character.

I tried to read https://magma.maths.usyd.edu.au/magma/handbook/text/410 for related information. It looks like the functions related to Hecke Grössencharacters are close to what I need, but it requires CM field to work, while I want to deal, say with $K=\mathbb{Q}(\sqrt{3})$.

Edit1: Thanks to Jeremy Rouse, I read http://magma.maths.usyd.edu.au/magma/handbook/text/1485 about creating a general L-series in Magma. It assumes that the shifts in the gamma factors are rational, while I want to do the following example:

$K=\mathbb{Q}(\sqrt{3})$, $\chi(\alpha)=Sgn(\alpha\alpha')(\alpha/\alpha')^{i\pi/R}$ where $R$ is the regulator (so that $\chi$ is $1$ on units).

$L(\chi)=\sum_{I\subset O_K}\chi(I)N(I)^{-s}$, whose gamma factor is

$$\nu(s)=(dπ^{−2})^{s/2}Γ(s/2+1/2+πi/2R)Γ(s/2+1/2−πi/2R).$$

I start with the following Magma code:

```
K:=QuadraticField(3);
C<i>:=ComplexField();
pi:=Pi(C);
d:=AbsoluteDiscriminant(K); d;
r:=Regulator(K);
mu:=pi/2/r; mu;
L := LSeries(1, [mu,-mu], d, 0: Sign:=1);
N := LCfRequired(L); N;
```

which results in "Runtime error in 'LSeries': elements of gamma must be integer or rational numbers". (So as Jeremy commented later, this cannot be doen with Magma. with add some detail if I work it out.)