# Generated by Django 3.0.8 on 2020-07-02 13:31

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    replaces = [('wippi', '0001_initial'), ('wippi', '0002_measurement_base_pressure'), ('wippi', '0003_measurement_fragment'), ('wippi', '0004_measurement_nozzle'), ('wippi', '0005_measurement_substance_links')]

    initial = True

    dependencies = [
        ('cheminventory', '0006_auto_20160322_1543'),
    ]

    operations = [
        migrations.CreateModel(
            name='Operator',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('firstname', models.CharField(max_length=50)),
                ('lastname', models.CharField(max_length=50)),
                ('email', models.EmailField(max_length=254)),
            ],
        ),
        migrations.CreateModel(
            name='Measurement',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('time', models.DateTimeField()),
                ('datafile', models.FileField(max_length=400, upload_to=b'wippi/%Y/%m/%d/%H/%M/%S/')),
                ('scantype', models.CharField(choices=[(b'ES', b'Energyscan'), (b'MS', b'Massscan')], default=b'ES', max_length=20)),
                ('gatetime', models.FloatField(blank=True, null=True)),
                ('polarity', models.CharField(choices=[(b'NEG', b'Negative'), (b'POS', b'Positive')], default=b'NEG', max_length=3)),
                ('electron_energy', models.FloatField(blank=True, null=True, verbose_name=b'Electron Energy (for MS)')),
                ('ion_energy', models.FloatField(blank=True, null=True)),
                ('substance', models.CharField(max_length=200)),
                ('description', models.CharField(max_length=200)),
                ('channeltron_1', models.FloatField(blank=True, default=5.8, null=True, verbose_name=b'Channeltron 1')),
                ('channeltron_2', models.FloatField(blank=True, null=True, verbose_name=b'Channeltron 2')),
                ('ue', models.FloatField(blank=True, null=True, verbose_name=b'Ue')),
                ('ue_fine', models.FloatField(blank=True, null=True, verbose_name=b'Ue fine')),
                ('oven_temperature', models.PositiveIntegerField(blank=True, null=True)),
                ('chamber_temperature', models.PositiveIntegerField(blank=True, default=90, null=True)),
                ('faraday_current', models.PositiveIntegerField(blank=True, null=True)),
                ('filament_current', models.FloatField(default=2.36)),
                ('emission', models.PositiveIntegerField(blank=True, null=True)),
                ('energy_resolution', models.FloatField(blank=True, null=True)),
                ('mass_resolution', models.FloatField(blank=True, default=25, null=True, verbose_name=b'Mass Resolution (Quadrupole)')),
                ('pressure_monochromator', models.CharField(default=b'2e-6', max_length=7, verbose_name=b'Pressure MC (mbar)')),
                ('pressure_pickup', models.CharField(blank=True, max_length=7, verbose_name=b'Pressure Pickup (mbar)')),
                ('pressure_cs', models.CharField(blank=True, max_length=7, verbose_name=b'Pressure Cluster Source (mbar)')),
                ('background_pressure', models.FloatField(blank=True, null=True, verbose_name=b'Background Pressure in MC (mbar)')),
                ('anode', models.FloatField(blank=True, null=True)),
                ('def_a', models.FloatField(blank=True, null=True)),
                ('def_i', models.FloatField(blank=True, null=True)),
                ('optics_inside', models.FloatField(blank=True, null=True)),
                ('optics_outside', models.FloatField(blank=True, null=True)),
                ('field_axis', models.FloatField(blank=True, null=True)),
                ('coil_voltage_xy', models.FloatField(blank=True, null=True, verbose_name=b'Coil Voltage XY')),
                ('coil_voltage_xz', models.FloatField(blank=True, null=True, verbose_name=b'Coil Voltage XZ')),
                ('coil_voltage_yz', models.FloatField(blank=True, null=True, verbose_name=b'Coil Voltage YZ')),
                ('coil_current_xy', models.FloatField(blank=True, null=True, verbose_name=b'Coil Current XY')),
                ('coil_current_xz', models.FloatField(blank=True, null=True, verbose_name=b'Coil Current XZ')),
                ('coil_current_yz', models.FloatField(blank=True, null=True, verbose_name=b'Coil Current YZ')),
                ('lens_1a', models.FloatField(blank=True, null=True)),
                ('lens_1b', models.FloatField(blank=True, null=True)),
                ('lens_1c', models.FloatField(blank=True, null=True)),
                ('lens_A1', models.FloatField(blank=True, null=True)),
                ('lens_L2', models.FloatField(blank=True, null=True)),
                ('lens_L3', models.FloatField(blank=True, null=True)),
                ('lens_2a', models.FloatField(blank=True, null=True)),
                ('lens_2b', models.FloatField(blank=True, null=True)),
                ('lens_2c', models.FloatField(blank=True, null=True)),
                ('lens_L4', models.FloatField(blank=True, null=True)),
                ('lens_L5', models.FloatField(blank=True, null=True)),
                ('lens_D1', models.FloatField(blank=True, null=True)),
                ('lens_D2', models.FloatField(blank=True, null=True)),
                ('lens_Ua', models.FloatField(blank=True, null=True)),
                ('lens_Ui', models.FloatField(blank=True, null=True)),
                ('uhk_mitte', models.FloatField(blank=True, null=True, verbose_name=b'UHK Mitte')),
                ('lens_3a', models.FloatField(blank=True, null=True)),
                ('lens_3b', models.FloatField(blank=True, null=True)),
                ('lens_3c', models.FloatField(blank=True, null=True)),
                ('lens_A2', models.FloatField(blank=True, null=True)),
                ('lens_L6', models.FloatField(blank=True, null=True)),
                ('lens_L7', models.FloatField(blank=True, null=True)),
                ('lens_4a', models.FloatField(blank=True, null=True)),
                ('lens_4b', models.FloatField(blank=True, null=True)),
                ('lens_4c', models.FloatField(blank=True, null=True)),
                ('lens_L8', models.FloatField(blank=True, null=True)),
                ('uex_mitte', models.FloatField(blank=True, null=True, verbose_name=b'Uex Mitte')),
                ('lens_A3', models.FloatField(blank=True, default=0, null=True)),
                ('lens_L10', models.FloatField(blank=True, default=0, null=True)),
                ('lens_SK1', models.FloatField(blank=True, default=0, null=True)),
                ('lens_SK2', models.FloatField(blank=True, default=0, null=True)),
                ('qmh', models.CharField(blank=True, max_length=5, verbose_name=b'QMH')),
                ('comments', models.TextField(blank=True)),
                ('operator', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='wippi.Operator')),
                ('base_pressure', models.CharField(blank=True, max_length=7, verbose_name=b'Base Pressure Cluster Source (mbar)')),
                ('fragment', models.CharField(blank=True, max_length=200)),
                ('nozzle', models.FloatField(blank=True, default=12, null=True, verbose_name=b'Nozzle Temperature')),
                ('substance_links', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='cheminventory.Chemical')),
            ],
            options={
                'ordering': ['-time'],
            },
        ),
        migrations.CreateModel(
            name='JournalEntry',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('time', models.DateTimeField()),
                ('comment', models.TextField()),
                ('attachment', models.FileField(blank=True, default=b'', upload_to=b'wippi/techjournal/')),
                ('operator', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='wippi.Operator')),
            ],
            options={
                'ordering': ['-time'],
                'verbose_name_plural': 'Journal Entries',
            },
        ),
        migrations.CreateModel(
            name='Calibration',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('time', models.DateTimeField(auto_now_add=True)),
                ('formula', models.CharField(blank=True, max_length=100, verbose_name=b'Calibration formula for copy-pasting')),
                ('logoutput', models.TextField(blank=True, verbose_name=b'Log output of fitlib')),
                ('p0', models.FloatField(blank=True)),
                ('comments', models.TextField(blank=True)),
                ('calibration_plot', models.FileField(blank=True, upload_to=b'wippi/calibrations/')),
                ('cal_base_file_1', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='calibration_cal_base_file', to='wippi.Measurement', verbose_name=b'Basefile used for this cal.')),
            ],
            options={
                'ordering': ['-time'],
            },
        ),
    ]
