Présentation
Cette bibliothèque permet de faire de la modélisation de points expérimentaux très simplement en ajoutant seulement deux lignes de code dans votre programme Python.
Avec cette bibliothèque, vous pourrez :
- Afficher la courbe modélisée sur le graphique ainsi que son équation.
- Sélectionner avec le “lasso”, les points expérimentaux à utiliser pour la modélisation.
- Afficher/masquer un réticule en appuyant sur la touche “espace” du clavier.
- Afficher/masquer la légende en appuyant sur la touche “m” du clavier.
- Copier-coller le graphique avec les touches Ctrl+C et Ctrl V.
Installation
Utilisez le gestionnaire de packages pip pour installer.
pip install modelisation
Dépendances
Les bibliothèques suivantes doivent être installées :
- matplotlib
- numpy
- scypy
- addcopyfighandler
Utilisation
import matplotlib.pyplot as plt
import modelisation
x = [0, 1e-3, 2e-3, 3e-3, 4e-3, 5e-3, 6e-3, 7e-3] # saisir les valeurs expérimentales de la grandeur en abscisse
y = [0, 0.221, 0.440, 0.665, 1.250, 1.105, 1.327, 1.550] # saisir les valeurs de la grandeur en ordonnée
plt.plot(x,y, color='red', marker='+', linestyle='none') # Afficher les points
modelisation.modele("lineaire",x ,y) # modèles disponibles : "lineaire", "affine", "parabole", "exp_croissante", "exp_decroissante", "double_affine"
plt.show()
Options
Depuis la version 1.0, il est possible de personnaliser la modélisation. Exemple :
modelisation.modele("affine", x, y, color = "red", linestyle = 'solid', linewidth = 2.5)
Il est maintenant possible de récupérer les données de la modélisation dans le programme Python. Un exemple pour le modèle affine (y = ax + b) :
a, b = modelisation.modele("affine", x, y)
- la variable 'a' contient le coefficient directeur ;
- la variable 'b' contient l'ordonnée à l'origine.
Pour plus d'informations : Description plus détaillée
Auteur
© Stéphane LAURENT - 2024
Lycée Valin - La Rochelle (17) - France
Metadata
Release files for modelisation 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| modelisation-1.0-py3-none-any.whl | Python 3 | none | any | Details for modelisation-1.0-py3-none-any.whl |
Release files / modelisation-1.0-py3-none-any.whl
| Download URL | modelisation-1.0-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eca5a53dfd5a4c9f8fbd5e04eab3321b1c5f01b9541b719b1a58cf67ac3390cf
|
|
BLAKE2b-256 checksum How to use checksums |
bf7f76042c908afff053278adf504538b7bcd5307dedf91417ef43ae285a61bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.5
|
Security for modelisation 1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.