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

swh:1:snp:dac718c98b0b3a3d1be0a1317e553dd28df4d361
  • Code
  • Branches (2)
  • Releases (0)
    • Branches
    • Releases
    • HEAD
    • refs/heads/main
    • refs/heads/tgwgraham-main-patch-61314
    No releases to show
  • dd6f73e
  • /
  • 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
  • revision
  • snapshot
content badge Iframe embedding
swh:1:cnt:b89e4cdcadafe7d2f90b3a06df6a674038adfff4
directory badge Iframe embedding
swh:1:dir:dd6f73e18369c2fc022f6882ec50b4852636816a
revision badge
swh:1:rev:77dbcca3d4ca2833a5d051d495d52444ba34ac27
snapshot badge
swh:1:snp:dac718c98b0b3a3d1be0a1317e553dd28df4d361
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
  • revision
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: 77dbcca3d4ca2833a5d051d495d52444ba34ac27 authored by Thomas Graham on 29 September 2022, 16:03:20 UTC
Add LICENSE
Tip revision: 77dbcca
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