Conversation
I figured out the data format for `vinoPCA.Data`
Working, but we need to flush the 'T' wines for the rest of the code to work. Bad code.
Not using files anymore.
wavelength range is now part of the calss properties
I have now defined spectrumId, which corresponds to the string "wineId-sampleId". We can now store the results of calculations in the spectra table and keep track of the algorithm used. Currently, raw or 'fluorescence-corrected'
…, not 100). Fixed it at great lengths, but now red wine test passes.
mirequem
left a comment
There was a problem hiding this comment.
J'ai eu un problème en essayant testDatabase, ce n'était pas possible d'accéder au serveur avec la commande keyring set mysql-cafeine2.crulrg.ulaval.ca dcclab. J'ai dû ajouter manuellement cafeine2-ssh et mysql-cafeine2.crulrg.ulaval.ca dans mon "trousseau d'accès" (keychain).
…emove old version in RamanDB
Getting spectra is 4x faster thanks to a better subselect
Je pense que j'ai trouvé: je me rappelle que ca se plaignait d'un "backend" absent. Peut-etre qu'il faut configurer directement pour dire que c'est macos. Par la ligne de commande, ca ne fonctionnait pas. Essaie ca: |
AntoineRousseau97
left a comment
There was a problem hiding this comment.
J'ai eu les mêmes problèmes que mireille. Toutefois, en suivant ses démarches, ca ne fonctionne toujours pas pour moi... J'ai toujours le message suivant:
Skipped: Now in setUp
Set the password in the system password manager on the command line with:
python -m keyring set mysql-cafeine2.crulrg.ulaval.ca dcclab
You should update PyDCCLab with pip install dcclab to get the latest version.
| uniqueLabelsInOrder = sorted(set(self.labels)) | ||
| possibleColorsInOrder = range(len(uniqueLabelsInOrder)) | ||
| colors = {} | ||
| for identifier, color in zip(uniqueLabelsInOrder, possibleColorsInOrder): | ||
| colors[identifier] = color*5 | ||
|
|
||
| colormap = [] | ||
| for identifier in self.labels: | ||
| colormap.append(colors[identifier]) |
There was a problem hiding this comment.
J'ai l'impression que quelque chose ne fonctionne pas avec la fonction colormap. Le nombre de couleur sur nos graphiques dépasse le nombre de bouteilles. La fonction set() permettrait de simplement garder les 19 valeurs différentes mais les labels sont 0000-0001 etc.. Donc j'ai l'impression qu'on crée N couleurs différentes... J'ai testé une autre méthode et le couleurs semblaient fonctionner
| uniqueLabelsInOrder = sorted(set(self.labels)) | |
| possibleColorsInOrder = range(len(uniqueLabelsInOrder)) | |
| colors = {} | |
| for identifier, color in zip(uniqueLabelsInOrder, possibleColorsInOrder): | |
| colors[identifier] = color*5 | |
| colormap = [] | |
| for identifier in self.labels: | |
| colormap.append(colors[identifier]) | |
| splitId = [] | |
| for i in range(0, len(self.labels)): | |
| splitId.append(self.labels[i].split("-")) | |
| colormap = list(map(int, list(zip(*splitId))[0])) | |
| return np.array(colormap) |
|
J'ai obtenue le même message que Antoine. Cependant en utilisant python -m keyring set mysql-cafeine2.crulrg.ulaval.ca dcclab et en entrant le mot de passe manuellement, mon problème était réglé. Le code roule pour moi mais il reste cependant une erreur (qui ne change pas les résultats) : .2022-03-31 20:55:42,049| ERROR | Password is required for key /Users/Shooshoo/.ssh/id_rsa Je ne sais pas où fournir ma clé et je ne sais pas non plus pourquoi est-ce que j'ai besoin de la donner. |
Context
I created a database
RamanDB()that can be used to obtain the spectra with some constraints (color, 'raw' or 'corrected'). You must have the dcclab module (pip install dcclab).The actual database is on cafeine and can be accessed remotely without problems (SSH tunnel, automatic, using account dcclab). It makes use of the module
keyringthat will store the password in the system keychain (install withpip install keyring) andsshtunnel(install withpip install sshtunnel). If the password is not found, it will tell you how to add it with a simple command.Usage
With the basic functions of
RamanDB(), it is possible to reconstruct the database from scratch if needed.Caveats
The database has been patially integrated in
vino.py, but it is not complete.Many checks will be added to
RamanDBand the MySQL database schema to maintain the coherence of the data.