Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • e2ce567
  • /
  • runTracking.py
Raw File Download
Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge Iframe embedding
swh:1:cnt:b89e4cdcadafe7d2f90b3a06df6a674038adfff4
directory badge Iframe embedding
swh:1:dir:e2ce567f2eb2e4060018e73e79b6d32efd29ce8d
Citations

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
runTracking.py
from quot import read_config, track_file
#import glob
from os.path import exists, splitext
import toml
from papa_utils import read_config, list_movies
import sys

def runTracking(configfile):


    columns = ['y','x','I0','bg','y_err','x_err','I0_err','bg_err','H_det','error_flag', 
          'snr','rmse','n_iter','y_detect','x_detect','frame','loc_idx','trajectory',  
          'subproblem_n_traj','subproblem_n_locs']

    config = read_config(configfile)
    movies = list_movies(config)

    for f in movies:
        try:
            currbasefname = splitext(f)[0]
            if exists('%s.csv' % currbasefname):
                print('%s.csv already tracked. Skipping.' % currbasefname)
                continue
            if not exists(f):
                raise Exception('File %s not found.' % f)
            trajs = track_file(f, **config)
            print(trajs)
            trajs.to_csv('%s.csv' % currbasefname, index=False, columns=columns)
        except BaseException as err:
            print('Had a problem with %s' % currbasefname)
            print(err)


      
if __name__ == "__main__":
    runTracking(sys.argv[1])

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Contact— JavaScript license information— Web API

back to top