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

Revision 77dbcca3d4ca2833a5d051d495d52444ba34ac27 authored by Thomas Graham on 29 September 2022, 16:03:20 UTC, committed by Thomas Graham on 29 September 2022, 16:03:20 UTC
Add LICENSE
1 parent c750930
  • Files
  • Changes
  • 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.

  • revision
  • directory
  • content
revision badge
swh:1:rev:77dbcca3d4ca2833a5d051d495d52444ba34ac27
directory badge Iframe embedding
swh:1:dir:dd6f73e18369c2fc022f6882ec50b4852636816a
content badge Iframe embedding
swh:1:cnt:b89e4cdcadafe7d2f90b3a06df6a674038adfff4
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.

  • revision
  • directory
  • content
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 ...
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])
The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

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