def from_lasio(cls, l, remap=None, funcs=None, data=True, req=None, alias=None, fname=None):
        """
        Constructor. If you already have the lasio object, then this makes a
        well object from it.

        Args:
            l (lasio object): a lasio object.
            remap (dict): Optional. A dict of 'old': 'new' LAS field names.
            funcs (dict): Optional. A dict of 'las field': function() for
                implementing a transform before loading. Can be a lambda.
            data (bool): Whether to load curves or not.
            req (dict): An alias list, giving all required curves. If not
                all of the aliases are present, the well is empty.

        Returns:
            well. The well object.
        """
        # Build a dict of curves.
        curve_params = {}
        for field, (sect, code) in LAS_FIELDS['data'].items():
            curve_params[field] = utils.lasio_get(l,
                                                  sect,
                                                  code,
                                                  remap=remap,
                                                  funcs=funcs)

        # This is annoying, but I need the whole depth array to
        # deal with edge cases, eg non-uniform sampling.

        # Add all required curves together.
        if req:
            reqs = utils.flatten_list([v for k, v in alias.items() if k in req])

        # Using lasio's idea of depth in metres:
        if l.depth_m[0] < l.depth_m[1]:
            curve_params['depth'] = l.depth_m
        else:
            curve_params['depth'] = np.flipud(l.depth_m)

        # Make the curve dictionary.
        depth_curves = ['DEPT', 'TIME']
        if data and req:
            curves = {c.mnemonic: Curve.from_lasio_curve(c, **curve_params)
                      for c in l.curves
                      if (c.mnemonic[:4] not in depth_curves)
                      and (c.mnemonic in reqs)}
        elif data and not req:
            curves = {c.mnemonic: Curve.from_lasio_curve(c, **curve_params)
                      for c in l.curves
                      if (c.mnemonic[:4] not in depth_curves)}
        elif (not data) and req:
            curves = {c.mnemonic: True
                      for c in l.curves
                      if (c.mnemonic[:4] not in depth_curves)
                      and (c.mnemonic in reqs)}
        else:
            curves = {c.mnemonic: True
                      for c in l.curves
                      if (c.mnemonic[:4] not in depth_curves)}

        if req:
            aliases = utils.flatten_list([c.get_alias(alias)
                                          for m, c
                                          in curves.items()]
                                         )
            if len(set(aliases)) < len(req):
                return cls(params={})

        # Build a dict of the other well data.
        params = {'las': l,
                  'header': Header.from_lasio(l, remap=remap, funcs=funcs),
                  'location': Location.from_lasio(l, remap=remap, funcs=funcs),
                  'data': curves,
                  'fname': fname}

        for field, (sect, code) in LAS_FIELDS['well'].items():
            params[field] = utils.lasio_get(l,
                                            sect,
                                            code,
                                            remap=remap,
                                            funcs=funcs)
        return cls(params)
Constructor. If you already have the lasio object, then this makes a
        well object from it.

        Args:
            l (lasio object): a lasio object.
            remap (dict): Optional. A dict of 'old': 'new' LAS field names.
            funcs (dict): Optional. A dict of 'las field': function() for
                implementing a transform before loading. Can be a lambda.
            data (bool): Whether to load curves or not.
            req (dict): An alias list, giving all required curves. If not
                all of the aliases are present, the well is empty.

        Returns:
            well. The well object.