Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.153.685 Times

pysdif 0.1.0

Company: Eduardo Moguillansky
Date Added: September 14, 2013  |  Visits: 437

pysdif

Report Broken Link
Printer Friendly Version


Product Homepage
Download (40 downloads)



pysdif is a Python library that allows to read and write any kind of SDIF file, to define new kinds of frames and matrices and to read and write metadata.<br /><br />The matrices read from a sdif file are exposed as numpy arrays.<br /><br />It exposes both a low level and a high level interface.<br /><br />The low level interface for reading and writing sdif files mirrors the sdif library quite transparently so that the example files and utilities using it can be directly translated with it. In particular it does not create any intermediate objects, even the data of the matrices is a numpy array mapped to the c array read from disk, so no allocation takes place. Whereas this makes for very fast code, one has to take care to copy the data if it will be used longer, since by the time a new matrix is read this data is no longer valid.<br /><br />to read for ex. 1TRC format:<br /><br />import pysdif<br /><br />sdif_file = pysdif.SdifFile('filename.sdif')<br />sig1TRC = pysdif.str2signature("1TRC")<br />while not sdif_file.eof:<br /> sdif_file.read_frame_header()<br /> if sdif_file.frame_numerical_signature) == sig1TRC:<br /> print sdif_file.time<br /> for n in range(sdif_file.matrices_in_frame):<br /> sdif_file.read_matrix_header()<br /> if sdif_file.matrix_numerical_signature == sig1TRC:<br /> data = sdif_file.get_matrix_data()<br /> # data is now a numpy array but you must copy the data if<br /> # you intend to keep it after you have read the matrix.<br /> # One you read a new matrix, this data will be no longer valid<br /> print data<br /><br />a more natural way:<br /><br />from pysdif import SdifFile<br />sdif_file = SdifFile('filename.sdif')<br />for frame in sdif_file:<br /> if frame.signature == "1TRC":<br /> print frame.time<br /> for matrix in frame:<br /> if matrix.signature == "1TRC":<br /> print matrix.get_data()<br /><br />the frames and the matrices resulting from the iteration are only guaranteed to be valid as long as no new frames and matrices are read<br /><br />to write a SdifFile:<br /><br />f = SdifFile('new_sdif.sdif', 'w')<br /># these are optional<br /># add some metadata<br />f.add_NVT({<br /> 'name' : 'my name',<br /> 'date' : time.asctime(time.localtime())<br />})<br /># define new frame and matrix types<br />f.add_frame_type('1NEW', '1ABC NewMatrix, 1FQ0 New1FQ0')<br />f.add_matrix_type('1ABC', 'Column1, Column2')<br /># now you can begin adding frames<br />frame = f.new_frame('1NEW', time_now)<br />frame.add_matrix('1ABC', array([<br /> [0, 1.2],<br /> [3.5, 8.13],<br /> ...<br /> ]))<br />frame.write()<br /><br /># say we just want to take the data from an existing<br /># sdiffile, modify it and write it back<br />in_sdif = SdifFile("existing-file.sdif")<br />out_sdif = SdifFile("outfile.sdif", "w")<br />out_sdif.clone_definitions(in_sdif)<br />for in_frame in in_sdif:<br /> if in_frame.signature == "1NEW":<br /> new_frame = out_sdif.new_frame("1NEW", in_frame.time)<br /> in_data = in_frame.get_matrix_data() # we know there is only one matrix<br /> # multiply the second column by 0.5<br /> in_data[:,1] *= 0.5<br /> new_frame.add_matrix('1ABC', in_data)<br /> new_frame.write()<br /><br />#md5=d9129a6bd3158365f5132a075a9e1274

Requirements: No special requirements
Platforms: *nix, Linux
Keyword: Array Data Date Define Files Frame Frames Level Library Longer Matrices Matrix Name039 Numpy Print Pysdif Quot Trcquot Sig Trc Valid Write
Users rating: 0/10

License: Freeware Size: 153.6 KB
USER REVIEWS
More Reviews or Write Review


PYSDIF RELATED
Development Editors  -  Free Hex Editor Neo 4.97.02.3667
View, Edit and Analyze Hexadecimal Data and Binary Files of any Size. Free Hex Editor Neo is a large files optimized freeware hex editor for everyone who works with ASCII, hex, decimal, float, double and binary data. Make patches with just two...
8.33 MB  
Libraries  -  libXEL 0.1.3
libXEL is an event log library that stores log data in SQLite files and is capable of exporting it as XML and CSV. It provides a set of C/C++ preprocessor macros for project integration. It can gather some information about the system at run time....
337.92 KB  
Development Tools  -  QuickTemplate 5.0.1
QuickTemplate class can manage a multi-level template (you can define blocks and multi-level nested blocks.) You can define simples varibles like {MYNAME} or {MYAGE}, or you can define an associative array which include all needed keys like:...
 
Business  -  Ultra AutoCAD Tool 4.2.1
Ultra AutoCAD Tool is a powerful batch utility program for AutoCAD drawing files. Features include: extract data from drawing files (CSV, XML, HTML), create DXFs from DWGs, find and replace text, find and replace block attribute values, find and...
271 KB  
Libraries  -  Config::FreeForm 0.01
Config::FreeForm is a Perl module that provides in-memory configuration data. SYNOPSIS use Config::FreeForm %options; Config::FreeForm provides in-memory configuration data in a free-form manner. Many existing configuration modules attempt...
5.12 KB  
File Synchronizers  -  e2undel 0.82
e2undel is an interactive console tool that recovers the data of deleted files on an ext2 file system under Linux. Included is a library that allows to recover deleted files by name. It does not require any knowledge about the secrets of the...
55.3 KB  
Multimedia & Graphics  -  Integrated Genome Browser 6.6.3 B9527
The Integrated Genome Browser (IGB, pronounced Ig-Bee) is an interactive, zoomable, scrollable software program you can use to visualize and explore genome-scale data sets, such as tiling array data, next-generation sequencing results, genome...
8.4 MB  
Search & Replace Tools  -  CI Hex Viewer (Linux) 1.3
CI Hex Viewer is a hexadecimal viewer and editor specially designed to facilitate low-level data processing. The software allows to analyze and edit raw binary data of both files and disks of any size. This program enables handling data on hard...
1.86 MB  
Libraries  -  Zebra_Session 2.0.2
Zebra_Session is a PHP class that acts as a wrapper for PHP's default session handling functions but instead of storing session data in flat files it stores them in a MySQL database, thus providing both better security and better performance. The...
10.74 KB  
Content Management  -  Tappeto Magico 0.6.3
Tappeto Magico is a HTML preprocessor written in Perl optimized for generating a large scale website. (can be used also for small website) You can define a website in a project file or further define the website into sections.You can also create a...
133.12 KB  
NEW DOWNLOADS IN LINUX SOFTWARE, PROGRAMMING
Linux Software  -  EasyEDA PCB Designer for Linux 2.0.0
EasyEDA, a great web based EDA(Electronics Design Automation) tool, online PCB tool, online PCB software for electronics engineers, educators, students, makers and enthusiasts. Theres no need to install any software. Just open EasyEDA in any...
34.4 MB  
Linux Software  -  wpCache® WordPress HTTP Cache 1.9
wpCache® is a high-performance, distributed object, caching system application, generic in nature, but intended for use in speeding up dynamic web applications, by decreasing database load time. wpCache® decreases dramatically the page...
3.51 MB  
Linux Software  -  Polling Autodialer Software 3.4
ICTBroadcast Auto Dialer software has a survey campaign for telephone surveys and polls. This auto dialer software automatically dials a list of numbers and asks them a set of questions that they can respond to, by using their telephone keypad....
488 B  
Linux Software  -  Total Video Converter Mac Free 3.5.5
Total Video Converter Mac Free developed by EffectMatrix Ltd is the official legal version of Total Video Converter which was a globally recognized brand since 2006. Total Video Converter Mac Free is a free but powerful all-in-one video...
17.7 MB  
Linux Software  -  Skeith mod_log_sql Analyzer 2.10beta2
Skeith is a php based front end for analyzing logs for Apache using mod_log_sql.
47.5 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB