Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use fixed origin for BEAST BDSKY model if tradition has a fixed composition date #80

Closed
jjmccollum opened this issue Mar 7, 2024 · 0 comments · Fixed by #81
Closed
Assignees
Labels
bug Something isn't working

Comments

@jjmccollum
Copy link
Owner

Suppose the work whose tradition is collated in the TEI XML input has a known date specified with a date element with a when attribute, as follows:

<bibl>
    <title>Title of the work</title>
    <date when="50"/>
</bibl>

Currently, this maps to a Uniform distribution whose lower and upper bounds match, which raises an exception in BEAST 2:

<distribution spec="Prior" id="originPrior" x="@origin">
    <distr spec="beast.base.inference.distribution.Uniform" lower="1974" upper="1974"/>
</distribution>

If the date is known, then this distribution element is unncessary in the BEAST XML output. We can simply add estimate="false" to the origin element:

<origin spec="parameter.RealParameter" id="origin" lower="1974" upper="1974" value="1974" estimate="false"/>

Likewise, the operator element with id="originScaler" and the log element with idref="origin" can be excluded in this case.

These changes should be made in beast_template.xml and the to_beast method in collation.py.

@jjmccollum jjmccollum added the bug Something isn't working label Mar 7, 2024
@jjmccollum jjmccollum self-assigned this Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant