Skip to content

Commit

Permalink
Merge branch 'master' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
tpeulen committed Jan 31, 2024
2 parents 568d52d + 8b30997 commit bcb7c13
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 15 deletions.
1 change: 0 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ conda:build:windows:
- win
script:
- conda activate base
- cd tools && git pull --force && cd..
- .\tools\build.bat

conda:test:linux:
Expand Down
1 change: 1 addition & 0 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ requirements:
- hdf5
- python
- setuptools
- typing # [py27]
- numpy
run:
- python
Expand Down
3 changes: 1 addition & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,7 @@
# index.html
release_highlights_dir = Path("..") / "examples" / "release_highlights"
# Finds the highlight with the latest version number
latest_highlights = sorted(release_highlights_dir.glob(
"plot_release_highlights_*.py"))[-1]
latest_highlights = sorted(release_highlights_dir.glob("plot_release_highlights_*.py"))[-1]
latest_highlights = latest_highlights.with_suffix('').name
html_context["release_highlights"] = \
f"auto_examples/release_highlights/{latest_highlights}"
Expand Down
8 changes: 4 additions & 4 deletions doc/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ <h4 class="sk-landing-subheader text-white font-italic mb-3">time-tagged time-re
<div class="col-md-4 mb-3 px-md-2 sk-px-xl-4">
<div class="card h-100">
<div class="card-body">
<a href="model_selection.html#model-selection"><h4 class="sk-card-title card-title">Photon distribution analysis</h4></a>
<p class="card-text">Recover fluorescence lifetimes and distance distributions.</p>
<a href="modules/pda.html"><h4 class="sk-card-title card-title">Photon distribution analysis</h4></a>
<p class="card-text">Analyze intensities and recover distances.</p>
<p class="card-text"><strong>Applications:</strong> Interaction studies, recover distances</br>
<strong>Methods:</strong>
<a href="modules/lifetime_analysis.html#maximum-likelihood-estimation">MLE</a>,
and <a href="modules/lifetime_analysis.html">more...</a></p>
</div>
<div class="overflow-hidden mx-2 text-center flex-fill">
<a href="auto_examples/single_molecule/plot_single_molecule_pda_2.html" aria-label="Photon distribution analysis">
<a href="auto_examples/single_molecule/plot_single_molecule_pda_2.html" aria-label="modPhoton distribution analysis">
<img src="_images/sphx_glr_plot_single_molecule_pda_2_001.png" class="sk-index-img" alt="Demonstration of a PDA">
</a>
</div>
Expand Down Expand Up @@ -148,7 +148,7 @@ <h4 class="sk-landing-call-header">News</h4>

<li><strong>On-going development:</strong>
<a href="whats_new.html"><strong>What's new</strong> (Changelog)</a>
<li><strong>April 2021.</strong> tttrlib 0.21.2 is available for download (<a href="whats_new/v0.21.0.html#version-0-0-21">Changelog</a>).
<li><strong>January 2024.</strong> tttrlib 0.25.0 is available for download (<a href="whats_new/v0.21.0.html#version-0-0-21">Changelog</a>).
<li><strong>tttrlib from 0.21 requires Python 3.8 or greater.</strong>
</li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion doc/themes/scikit-learn-modern/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<a class="sk-nav-link nav-link" href="{{ pathto('api/index') }}">API</a>
</li>
<li class="nav-item">
<a class="sk-nav-link nav-link" href="{{ pathto('examples/index') }}">Applications</a>
<a class="sk-nav-link nav-link" href="{{ pathto('auto_examples/index') }}">Applications</a>
</li>
{%- for title, link in drop_down_navigation %}
<li class="nav-item">
Expand Down
11 changes: 6 additions & 5 deletions examples/tttr/plot_tttr_header.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"""

import tttrlib
data = tttrlib.TTTR('./test/data/bh/bh_spc132.spc', 'SPC-130')

data = tttrlib.TTTR('../../tttr-data/bh/pq/bh_spc132.spc', 'SPC-130')
# the header can be accesses by the method get_header or as an property
header = data.header

Expand All @@ -40,10 +41,10 @@
# attribute modifies the header / meta data of a TTTR object.

import json
data = tttrlib.TTTR('./test/data/PQ/PTU/PQ_PTU_HH_T3.PTU', 'PTU')
data = tttrlib.TTTR('./test/data/PQ/PTU/pq_ptu_hh_t3.ptu', 'PTU')

#%%
# the header can be accesses by the method get_header or as an property
# the header can be accesses by the method get_header or as a property

header = data.header
header_json = header.json
Expand Down Expand Up @@ -89,7 +90,7 @@
# Creating and writing TTTRHeader
# ===============================
# Each TTTR object has an attribute that is an instance of the TTTRHeader class.
# This instances makes the meta data contained in the TTTR file accessible. TTTRHeader
# This instances makes the meta-data contained in the TTTR file accessible. TTTRHeader
# objects can also be created independently of TTTR object.

header = tttrlib.TTTRHeader()
Expand All @@ -105,7 +106,7 @@

#%%
# The JSON string must contain a `tags` list. The `tags` list is a list of dictionarys
# in which each dictionary corresponds to a meta data field in the header. For instance,
# in which each dictionary corresponds to a meta-data field in the header. For instance,

print(header.json) # '{\n "tags": []\n}'

Expand Down
1 change: 0 additions & 1 deletion ext/python/Correlator.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ def __getattr__(self, item):
else:
raise AttributeError


@property
def correlation(self):
return self.get_corr_normalized()
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ select = "cp3{8,9,10}-*"

before-all = [
"yum update -y --nogpgcheck",
"yum update -y",
"yum install -y epel-release",
"yum -y install boost-devel swig cmake"
]
Expand Down
6 changes: 6 additions & 0 deletions src/TTTR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,9 @@ int TTTR::read_file(const char *fn, int container_type) {
header = new TTTRHeader(fp, container_type);
fp_records_begin = header->end();
tttr_record_type = header->get_tttr_record_type();
#ifdef VERBOSE_TTTRLIB
std::clog << "-- TTTR record type: " << tttr_record_type << std::endl;
#endif
processRecord = processRecord_map[tttr_record_type];
n_records_in_file =
get_number_of_records_by_file_size(
Expand Down Expand Up @@ -373,6 +376,9 @@ void TTTR::read_records(
size_t chunk
) {
n_rec = n_rec < n_records_in_file ? n_rec : n_records_in_file;
#ifdef VERBOSE_TTTRLIB
std::cout << "-- Records that will be read : " << n_rec << std::endl;
#endif
if(rewind) fseek(fp, (long) fp_records_begin, SEEK_SET);

// The data is read in two steps. In the first step bigger data chunks
Expand Down

0 comments on commit bcb7c13

Please sign in to comment.