Mercurial > hg > amuse
view base/datasets/functions.lisp @ 258:aac79c0ac1b9
add within-short-bar-p, and use this to correctly calculate the
ioi-from-bar of anacruses
author | Jamie Forth <j.forth@gold.ac.uk> |
---|---|
date | Thu, 24 Feb 2011 18:50:38 +0000 |
parents | 6a3adca16910 |
children |
line wrap: on
line source
(cl:in-package #:amuse-datasets) (defun make-composition-identifiers-from-file (package pathname) "This reads a file that contains one id per line, and returns a list of composition-identifiers (specialised on package). It is useful for reading files that have been exported from the database, for use with the above functions." (with-open-file (stream pathname :direction :input) (loop for id = (read stream nil) while id collect (make-composition-identifier package id)))) (defun assign-compositions-to-dataset (composition-identifiers dataset-identifier) "This could be done more sensibly, at least for datasets stored in the database." (loop for identifier in composition-identifiers do (assign-composition-to-dataset identifier dataset-identifier)))