From 72fadf5988448ad0c3f2abe90e97f149cfc39b3d Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc kop@karlpinc.com" Date: Sat, 28 Feb 2026 22:52:00 +0000 Subject: [PATCH] New ESTRUS_SOURCES table to support non-SokweDB estrus data sources --- doc/src/epilog.inc.m4 | 17 ++++ doc/src/tables.m4 | 1 + doc/src/tables/estrus_sources.m4 | 165 +++++++++++++++++++++++++++++++ 3 files changed, 183 insertions(+) create mode 100644 doc/src/tables/estrus_sources.m4 diff --git a/doc/src/epilog.inc.m4 b/doc/src/epilog.inc.m4 index e7ef342..e6f2502 100644 --- a/doc/src/epilog.inc.m4 +++ b/doc/src/epilog.inc.m4 @@ -217,6 +217,23 @@ sdb_generated_rst()dnl .. |ENTRYTYPES.EntryType| replace:: :ref:`EntryType ` +.. |ESTRUS_SOURCES| replace:: + :ref:`ESTRUS_SOURCES ` +.. |ESTRUS_SOURCES.ID| replace:: + :ref:`ID ` +.. |ESTRUS_SOURCES.Source| replace:: + :ref:`Source ` +.. |ESTRUS_SOURCES.Date| replace:: + :ref:`Date ` +.. |ESTRUS_SOURCES.AnimID| replace:: + :ref:`AnimID ` +.. |ESTRUS_SOURCES.EstrusMin| replace:: + :ref:`EstrusMin ` +.. |ESTRUS_SOURCES.EstrusMax| replace:: + :ref:`EstrusMax ` +.. |ESTRUS_SOURCES.Notes| replace:: + :ref:`Notes ` + .. |EVENTS| replace:: :ref:`EVENTS ` .. |EVENTS.EID| replace:: :ref:`EID ` diff --git a/doc/src/tables.m4 b/doc/src/tables.m4 index b61113d..40bc6d0 100644 --- a/doc/src/tables.m4 +++ b/doc/src/tables.m4 @@ -37,6 +37,7 @@ and are therefore the result of at least a rudimentary analytical process. tables/biography_log.rst tables/comm_membs.rst tables/comm_memb_log.rst + tables/estrus_sources.rst tables/events.rst tables/follows.rst tables/follow_observers.rst diff --git a/doc/src/tables/estrus_sources.m4 b/doc/src/tables/estrus_sources.m4 new file mode 100644 index 0000000..f94b096 --- /dev/null +++ b/doc/src/tables/estrus_sources.m4 @@ -0,0 +1,165 @@ +.. Copyright (C) 2026 The Meme Factory, Inc. www.karlpinc.com + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +.. M4 setup +include(constants.m4)dnl +include(macros.m4)dnl +sdb_rst_quotes(`on')dnl +sdb_generated_rst()dnl + +.. _ESTRUS_SOURCES: + +ESTRUS_SOURCES +------------------------- + +.. |ESTRUS_SOURCES_summary| replace:: + There is a row for each female chimpanzee, for each date + estrus information was recorded. + Rows exist both for non-BRec related sightings, and for BRec + related sighting when those sightings were recorded in the old, MS + Access based, database. + Going forward, this table is used to make non-BRec related, changes + to the per-day record of female chimpanzee estrus information found + in the |ESTRUS_STATES| table. + +|ESTRUS_SOURCES_summary| + +This table provides a way to incorporate estrus state information from +records kept outside of SokweDB into the per-individual, per-day +estrus state information found in the |ESTRUS_STATES| table. +See :ref:`the ESTRUS_STATE documentation ` +or further information on how estrus state information is summarized +in the |ESTRUS_STATES| table. + +There must either be a non-|null| |ESTRUS_SOURCES.EstrusMin| value or +a non-|null| |ESTRUS_SOURCES.EstrusMax| value; in a single row, both +the |ESTRUS_SOURCES.EstrusMin| and the |ESTRUS_SOURCES.EstrusMax| may +not be |null|. + +The |ESTRUS_SOURCES.AnimID| value must be that of a female. +This means that the |BIOGRAPHY_DATA|.\ |BIOGRAPHY_DATA.Sex| value must +be ``sdb_female``. + +The |ESTRUS_SOURCES.Date| must be during a period when the sighted +individual was under study, on or after the individual's +|BIOGRAPHY_DATA|.\ |BIOGRAPHY_DATA.EntryDate| and on or before the +individual's |BIOGRAPHY_DATA|.\ |BIOGRAPHY_DATA.DepartDate|. +Further, the |ESTRUS_SOURCES.Date| must be on a day when the +individual is between sdb_min_adolescent_age +sdb_min_adolescent_age_units old and sdb_max_swelling_age +sdb_max_swelling_age_units old, inclusive of endpoints.\ [#f1]_ + +.. contents:: + :depth: 2 + + +.. _ESTRUS_SOURCES.ID: + +ID (IDentifier) +``````````````` + +.. |ESTRUS_SOURCES.ID_summary| replace:: + |idcol| + +|ESTRUS_SOURCES.ID_summary| |notnull| + + +.. _ESTRUS_SOURCES.Source: + +Source +`````` + +.. |ESTRUS_SOURCES.Source_summary| replace:: + Code indicating the record in which the estrus state was + recorded. + A |SIGHTING_RECORDS|.\ |SIGHTING_RECORDS.Code| value. + +|ESTRUS_SOURCES.Source_summary| +The special value ``sdb_sowkedb_source`` may not appear as a value in +this column. + +|notnull| + + +.. _ESTRUS_SOURCES.Date: + +Date +```` + +.. |ESTRUS_SOURCES.Date_summary| replace:: + The date of the individual's estrus state measurement. + +|ESTRUS_SOURCES.Date_summary| |notnull| + + +.. _ESTRUS_SOURCES.AnimID: + +AnimID (Animal IDentifier) +`````````````````````````` + +.. |ESTRUS_SOURCES.AnimID_summary| replace:: + The |BIOGRAPHY_DATA|.\ |BIOGRAPHY_DATA.AnimID| of the individual + who's estrus state was recorded. + +|ESTRUS_SOURCES.AnimID_summary| |notnull| + + +.. _ESTRUS_SOURCES.EstrusMin: + +EstrusMin (Estrus Minimum swelling) +``````````````````````````````````` + +.. |ESTRUS_SOURCES.EstrusMin_summary| replace:: + The minimum estrus swelling observed on the day. + A |CYCLE_STATES|.\ |CYCLE_STATES.Code| value. + +|ESTRUS_SOURCES.EstrusMin_summary| + +This value may only be |null| when the |ESTRUS_SOURCES.Source| value +is ``sdb_manual_estrus``. + + +.. _ESTRUS_SOURCES.EstrusMax: + +EstrusMax (Estrus Maximum swelling) +``````````````````````````````````` + +.. |ESTRUS_SOURCES.EstrusMax_summary| replace:: + The maximum estrus swelling observed by the given source on the + given day. + A |CYCLE_STATES|.\ |CYCLE_STATES.Code| value. + +|ESTRUS_SOURCES.EstrusMax_summary| + +This value may only be |null| when the |ESTRUS_SOURCES.Source| value +is ``sdb_manual_estrus``. + + +.. _ESTRUS_SOURCES.Notes: + +Notes +````` + +.. |ESTRUS_SOURCES.Notes_summary| replace:: + Textual notes related to the estrus state. + +|ESTRUS_SOURCES.Notes_summary| |notnull| + + +rubric:: Footnotes + +.. [#f1] + The lower age limit is the minimum age of adolescence, the upper + the maximum age limit for recording female sexual swelling values. -- 2.34.1