[Babase] sexskins upload errors_no mdates
kfenn
kfenn at princeton.edu
Mon May 12 11:51:06 EDT 2008
Karl O. Pinc wrote:
>
> As we figured out on the phone together the Mdates are not there
> because these are the resumption cycles after pregnancy.
>
> I found 2 bugs in the system related to sexskins.
>
> First, as we found during our phone call, the test for whether
> the cycle associated with the sexskin has an Mdate was not
> properly checking whether the cycle was one of resumption
> after pregnancy. (It was testing sexskins.cid = pregs.resume,
> which does not work because pregs.resume does not have a
> cycles.cid value.) (Fix in db/triggers/sexskins.m4)
>
OK. I'm with you so far. PREGS.resume = MTD_CYCLES.tcpid =
CYCPOINTS.cpid. There is no CYCLES.cid corresponding to PREGS.resume.
When you say "Fix in db/..." does that mean the fix is already in there
or you are commanding yourself to fix it? (Another paragraph below says
it is fixed. So is the fix in the section of code just before the line
that reads "Raise exception.....No Mdate found" (about halfway through
sexskins.m4)? I'm having trouble knowing where to look.
> Second, I took another look at the automatic assignment of sexskins to
> cycles with pregnancies in mind and found that the code was not
> testing for pregnancy. It was assigning the sexskin to the cycle of
> the CYCPOINTS row on or before the SEXSKINS.Date value, and failing
> over to the CYCPOINTS row after SEXSKINS.Date when such a row did not
> exist.
So this was just ...."Hey, I wonder if we even though to check for
pregnancies when doing the sexskin assignments"...correct? And you
found that the code hadn't been written yet? Or you found that the code
was written, but wrong? I'm not clear because I think I am missing some
language in your paragraph above. I don't understand the phrase
"...failing over to the CYCPOINTS row after SEXSKINS.date..." Failing
to carry something over?
> This means that when there's no Mdate after a pregnancy the
> preceeding CYCPOINTS row will be the Zdate, and any sexskins belonging
> to the resume cycle but before the Tdate of the resume cycle are
> erroneously assigned to the conception cycle not the resume cycle.
> (fix in db/include/globalmacros.m4)
>
So we potentially had two sets of sexskin sizes for the same dates?
Maybe clarification on the above will help me understand this statement
better.
> I fixed these problems and installed the code. Please test.
> Run the tests in babase_test first. I've tested, but no
> point in mucking up the real data if there's still a problem
> somewhere. Thanks.
>
Will do as soon as I'm sure I understand the rest of your email. I
always work in babase_test until I know what I'm doing.
> This leaves 2 potential problems with the sexskin data in the database.
>
> Please double check my analysis here, at least as far as you can.
> (If you like, read the code and check my fix there too.)
>
> 1)
>
> Sexskins occurring after a conception but before the Tdate are
> assigned the
> wrong cycle. (The prior cycle, the conception cycle.)
>
I'm confused here. You mean sexskins that might occur between the mdate
and tdate are assigned to the prior cycle ( the conceptive cycle)?
However they should instead be all glommed together as part of an mtd
cycle?
I'm going to have to stop here for now because intepreting the rest of
the email sort of depends on your response to these questions.
Thanks,
Tabby
--
Tabby Fenn
Research Assistant
Dept of Ecology and Evolutionary Biology
401 Guyot Hall
Princeton University
Princeton, NJ 08544
609 258-6898 (Ph)
609 258-2712 (Fx)
More information about the Babase
mailing list