From 04e963002c43bf725f906ce427ad54cdfa74f2b1 Mon Sep 17 00:00:00 2001 From: jjmccollum Date: Wed, 24 Apr 2024 23:24:55 +1000 Subject: [PATCH] :abc: Added documentation for time-dependent transcriptional relations; removed some stray print statements --- docs/advanced.rst | 20 ++++++++++++++++++++ teiphy/collation.py | 2 -- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/docs/advanced.rst b/docs/advanced.rst index f761bb2..afa64c5 100644 --- a/docs/advanced.rst +++ b/docs/advanced.rst @@ -556,6 +556,26 @@ summing multiple rates if more than one tag is specified for a transition. All transitions not covered by a ``relation`` element (e.g., a transition from reading 3 to reading 1, which is not covered in the example above) will be assigned the "default" rate of 1. Accordingly, if no ``listRelation`` for transcriptional change categories is specified at all, then the substitution model for a variation unit with *k* substantive readings will default to the Lewis Mk model. +In many cases, certain transcriptional explanations are applicable only at certain times. +For instance, assimilation to a popular text that arose at a later point in the tradition's history (modeled with the ``Byz`` class in the above example) would only be available as a transcriptional explanation after this point. +Skips of the eye may be empirically more common for earlier scribes than for later ones. +Certain paleographic confusions may only be possible for earlier scripts or later ones. +Specific orthodox corruptions of sacred texts may have only become plausible after certain theological conflicts or developments had taken place to inspire them. +If you wish to encode such transcriptional possibilities as time-dependent, you can do so by adding ``@notBefore`` and ``@notAfter`` attributes to the corresponding ``relation`` element: + +.. code:: xml + + + + + + + + + + +If you tag certain transcriptional ``relation`` elements in this way, ``teiphy`` will map the ``listRelation`` to an ``EpochSubstitutionModel`` instance consisting of multiple substitution models that apply at the corresponding points in time. + Logging for Ancestral State Reconstructions ------------------------------------------- diff --git a/teiphy/collation.py b/teiphy/collation.py index c0011a9..a7e19a9 100644 --- a/teiphy/collation.py +++ b/teiphy/collation.py @@ -1193,8 +1193,6 @@ def get_beast_origin_span(self, tip_date_range): # If the lower bound on the date of the work's composition is defined, then set the upper bound on the height of the origin using it and the latest tip date: if self.origin_date_range[0] is not None: origin_span[1] = tip_date_range[1] - self.origin_date_range[0] - print(self.origin_date_range) - print(origin_span) return tuple(origin_span) def get_beast_date_map(self, taxlabels):