Opened 7 years ago

Last modified 7 years ago

#354 assigned defect

2DSA/fit meniscus oddity

Reported by: dzollars Owned by: gegorbet
Priority: normal Milestone: future
Component: ultrascan3 Version:
Keywords: Cc:

Description

It appears that fit meniscus is not deleting the non-selected models as expected.

Attachments (1)

fitmen-details.png (88.1 KB) - added by gegorbet 7 years ago.
manage_data details on two different fit model records

Download all attachments as: .zip

Change History (4)

comment:1 Changed 7 years ago by dzollars

Upon closer investigation, it looks like maybe an extra set of records is being created, then deleted, and the original set of 10 fit-meniscus models is still there. To demonstrate, I created an experiment and an edit profile. Here's the edit profile in the database:

mysql> select editedDataID, label, filename from editedData
    -> where editedDataID = 137;
+--------------+---------------------+-----------------------------------------------+
| editedDataID | label               | filename                                      |
+--------------+---------------------+-----------------------------------------------+
|          137 | demo1_veloc_test_fm | demo1_veloc_test_fm.1206221240.RA.2.A.260.xml |
+--------------+---------------------+-----------------------------------------------+
2 rows in set (0.00 sec)

Let's do a meniscus fit with edit profile 137 (1206221240). To start there are no models associated with it:

mysql> select modelID, meniscus, variance from model where editedDataID=137;
Empty set (0.00 sec)

Next I did a 2DSA fit time-invariant noise in LIMS and got this model and noise:

mysql> select modelID, meniscus, variance from model where editedDataID=137;
+---------+----------+-------------+
| modelID | meniscus | variance    |
+---------+----------+-------------+
|    4907 |  6.02035 | 1.81172e-05 |
+---------+----------+-------------+
1 row in set (0.00 sec)

mysql> select noiseID, modelID, noiseType from noise
    -> where editedDataID=137;
+---------+---------+-----------+
| noiseID | modelID | noiseType |
+---------+---------+-----------+
|    1417 |    4907 | ti_noise  |
+---------+---------+-----------+
1 row in set (0.00 sec)

Then using the 2DSA program in UltraScan, I accepted the noise file and did a meniscus fit. Now I have these models. The first one is the same one as before and the other 10 came from the fit:

mysql> select modelID, meniscus, variance from model where editedDataID=137;
+---------+----------+-------------+
| modelID | meniscus | variance    |
+---------+----------+-------------+
|    4907 |  6.02035 | 1.81172e-05 |
|    4908 |  6.00535 | 4.74426e-05 |
|    4909 |  6.00868 | 3.66589e-05 |
|    4910 |  6.01202 | 2.86056e-05 |
|    4911 |  6.01535 |  2.1491e-05 |
|    4912 |  6.01868 | 1.95589e-05 |
|    4913 |  6.02202 | 1.92402e-05 |
|    4914 |  6.02535 |  2.2765e-05 |
|    4915 |  6.02868 | 2.92235e-05 |
|    4916 |  6.03202 | 3.99735e-05 |
|    4917 |  6.03535 | 5.18034e-05 |
+---------+----------+-------------+
11 rows in set (0.00 sec)

Next, I loaded up the meniscus fit program and loaded the models. At this point I haven't yet done anything with them, they're only just loaded. But now I have an extra 10 models in the database that look like copies of the original meniscus fit models:

mysql> select modelID, meniscus, variance from model where editedDataID=137;
+---------+----------+-------------+
| modelID | meniscus | variance    |
+---------+----------+-------------+
|    4907 |  6.02035 | 1.81172e-05 |
|    4908 |  6.00535 | 4.74426e-05 |
|    4909 |  6.00868 | 3.66589e-05 |
|    4910 |  6.01202 | 2.86056e-05 |
|    4911 |  6.01535 |  2.1491e-05 |
|    4912 |  6.01868 | 1.95589e-05 |
|    4913 |  6.02202 | 1.92402e-05 |
|    4914 |  6.02535 |  2.2765e-05 |
|    4915 |  6.02868 | 2.92235e-05 |
|    4916 |  6.03202 | 3.99735e-05 |
|    4917 |  6.03535 | 5.18034e-05 |
|    4918 |  6.00535 | 4.74426e-05 |
|    4919 |  6.00868 | 3.66589e-05 |
|    4920 |  6.01202 | 2.86056e-05 |
|    4921 |  6.01535 |  2.1491e-05 |
|    4922 |  6.01868 | 1.95589e-05 |
|    4923 |  6.02202 | 1.92402e-05 |
|    4924 |  6.02535 |  2.2765e-05 |
|    4925 |  6.02868 | 2.92235e-05 |
|    4926 |  6.03202 | 3.99735e-05 |
|    4927 |  6.03535 | 5.18034e-05 |
+---------+----------+-------------+
21 rows in set (0.00 sec)

Then I clicked the "Update Edit" button, and it told me that it was going to delete 9 models in the database and on the local disk. This is what I would expect to happen---we keep the closest one and delete the rest. Here's what's in the database now:

mysql> select modelID, meniscus, variance from model where editedDataID=137;
+---------+----------+-------------+
| modelID | meniscus | variance    |
+---------+----------+-------------+
|    4907 |  6.02035 | 1.81172e-05 |
|    4908 |  6.00535 | 4.74426e-05 |
|    4909 |  6.00868 | 3.66589e-05 |
|    4910 |  6.01202 | 2.86056e-05 |
|    4911 |  6.01535 |  2.1491e-05 |
|    4912 |  6.01868 | 1.95589e-05 |
|    4913 |  6.02202 | 1.92402e-05 |
|    4914 |  6.02535 |  2.2765e-05 |
|    4915 |  6.02868 | 2.92235e-05 |
|    4916 |  6.03202 | 3.99735e-05 |
|    4917 |  6.03535 | 5.18034e-05 |
|    4923 |  6.02202 | 1.92402e-05 |
+---------+----------+-------------+
12 rows in set (0.00 sec)

According to my accounting, record 4907 and 4923 (or 4913) should be there, but the other 10 should not be. The fit meniscus program has successfully identified and deleted 9 models, but it's working from the copied list and the original list of models is being lost.

comment:2 Changed 7 years ago by gegorbet

I was not able to duplicate the reported behavior with demo1_veloc in uslims3_cauma3. I ran a meniscus scan in 2DSA. The database showed 10 new models. After running fit_meniscus and loading that fitmen set, I still have only the same 10 models (where editedDataID=145). After clicking Update Edit and authorizing the removal of non-selected models, only the selected model remains.

Changed 7 years ago by gegorbet

manage_data details on two different fit model records

comment:3 Changed 7 years ago by gegorbet

  • Owner changed from dzollars to gegorbet
  • Status changed from new to assigned

An examination of details of the model records mentioned in this ticket seems to indicate that the two sets of models came from two different clicks of the Save button in 2DSA. The last record of the first set and the only remaining record of the second set have different analysis time stamp parts (different by 1 minute). This can only happen with different Save clicks since the time stamp is created just once for all outputs of a save action. The fit meniscus program does no writing of DB records and certainly does not change labels.

Review-ready.

Note: See TracTickets for help on using tickets.